5 <meta name=
"viewport" content=
"width=device-width, initial-scale=1" />
7 <link rel=
"stylesheet" href=
"../style.css#" type=
"text/css" />
8 <title>Long pressed link menu
</title>
9 <script type=
"text/javascript">
11 let href
= location
.href
;
12 for(let i
=href
.length
-1;i
>0;i
--){
13 if('/'==href
.charAt(i
) && '/'==href
.charAt(i
-3))
20 location
.href
= location
.href
.substring(0,i
+1)+page
;
22 function nav2Lang(lang
){
24 let href
= location
.href
;
25 location
.href
= location
.href
.substring(0,i
-2)+lang
+location
.href
.substring(i
);
30 <header class='header'
>
31 <a class=
"logo" href=
"javascript:void(0)" onclick=
"return nav2('index.html#')">Home
</a> <a class=
"logo" href=
"javascript:void(0)" onclick=
"return nav2('tags/index.html#')">Tags
</a>
34 <a class=
"logo" href=
"javascript:void(0)" onclick=
"return nav2Lang('zh')">简体中文
</a>
42 <div class=
"container">
43 <h1 class=
"title">Long pressed link menu
45 <span class=
"subtitle"></span>
49 <li><a href=
"../tags/javascript/index.html#">javascript
</a> </li>
52 <h4 id=
"to-run-commands">To run commands
</h4>
53 <p>Each line of file
"<a href=
"file:///data/data/info.torapp.uweb/files/default.longclick">default.longclick
</a>" has the following format: (same as
<a href=
"../cmds/index.html#">default.cmds
</a>)
<br>
54 [Name]:[mimetype]:[command line]
<br>
55 in which [command line] can have
<a href=
"../cmds/index.html#">"%c
" (cookie),
"%u
" (current url),
"%t
" (title)
</a> etc.
</p>
56 <h4 id=
"to-visit-url-and-load-javascript-file">To visit url and load javascript file
</h4>
57 <p>All
".js
" files under the folder
"<a href=
"file:///data/data/info.torapp.uweb/files/longclick/">longclick
</a>" are part of the popup menu.
<br>
58 These javascript files are in the following format:
</p>
60 <li>The very first line can begin with
"//
" followed by website url that can have
<a href=
"../cmds/index.html#">"%u
" (current url),
"%t
" (title)
</a> etc. included. In this case, the website is visited, then the javascript file is loaded on the new loaded site.
</li>
61 <li>In the
".js
" file, variable
"arguments
" can be used to get parameters. in which arguments[
1] is the long-pressed link url, argument[
2] is the text description and arguments[
0] is the
".js
" file name.
</li>
65 <p>Last Modified:
2 April
2024<br>
66 add js function in README
<br>
71 src='https://giscus.app/client.js'
72 data-repo=
"torappinfo/uweb"
73 data-repo-id=
"MDEwOlJlcG9zaXRvcnkzMDIyMDU3MjE="
74 data-category=
"Announcements"
75 data-category-id=
"DIC_kwDOEgNLGc4CQjsh"
78 data-reactions-enabled=
"1"
79 data-emit-metadata=
"0"
80 data-input-position=
"top"
84 crossorigin=
"anonymous" async
>
87 <footer class=
"site-footer">
88 <div class=
"container">
89 © 2018-
2024 Richard H. Cao
92 <!-- This document is licensed under the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is available at <https://www.gnu.org/licenses/>. -->