5 <meta name=
"viewport" content=
"width=device-width, initial-scale=1" />
7 <link rel=
"stylesheet" href=
"../style.css#" type=
"text/css" />
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">Links
45 <span class=
"subtitle"></span>
50 <p>Click the following links to install menus popped by long pressing the bookmark button (with star as icon):
<br>
51 <a href=
"i:0gdefault.link::Capture::ccapture%0A">Capture long screenshot
</a> (need
<a href=
"i:61:../searchurl/func.html">long screenshot mode
</a>)
</p>
52 <p><a href=
"i:0gdefault.link:../searchurl/txt/link.cfg">Select All:CTRL-A/undo:CTRL-Z/Redo:CTRL-Y
</a><br>
53 <a href=
"i:0gdefault.link::Extend cookies::0cc;Max-Age=315360000%0A">Extend site cookies to
10 years
</a><br>
54 <a href=
"i:0gdefault.link::Clear cookies::0cc;Max-Age=0%0A">Clear site cookies
</a></p>
55 <p><a href=
"i:0gdefault.link::vpn:i:1dandroid.net.vpn.SETTINGS:::%0A">VPN
</a></p>
56 <p><a href=
"i:0gdefault.link::profile_config::cprofile . files .conf%0A">Switch configuration
</a></p>
57 <p><a href=
"i:0gdefault.link::Wait msg:i:1w%0A">Wait for network msg
</a></p>
58 <p><a href=
"i:0gdefault.link::Certificate info:i:1c%0A">Certificate info
</a></p>
59 <p><a href=
"i:0gdefault.link::Backup2Box: {let path=`%f`;let iSlash=path.lastIndexOf('/',path.length-2);let f;if('/'!=path[path.length-1])f=path.substring(iSlash+1);else f=path.substring(iSlash+1,path.length-1);location.href='i:0e'+path+':https://dav.box.com/dav/'+f+'.tgz';}%0A">Backup to box.com
</a></p>
60 <p><a href=
"i:0gdefault.link::restoreFromBox: {let path=`%f`;let iSlash=path.lastIndexOf('/',path.length-2);let f;if('/'!=path[path.length-1])f=path.substring(iSlash+1);else f=path.substring(iSlash+1,path.length-1);location.href='i:0dhttps://dav.box.com/dav/'+f+'.tgz';}%0A">Restore from box.com
</a></p>
61 <p><a href=
"i:0gdefault.link::up2Box: {let path=`%f`;let iSlash=path.lastIndexOf('/',path.length-2);let f;if('/'!=path[path.length-1])f=path.substring(iSlash+1);else f=path.substring(iSlash+1,path.length-1)+'.tgz';location.href='i:0u'+path+':https://dav.box.com/dav/'+f;}%0A">upload to box.com
</a></p>
62 <p><a href=
"../searchurl/webdav.html">More webdav link menu items
</a></p>
63 <p><a href=
"i:0gdefault.link::web fullscreen: location.href='i:5fsetTimeout(()=>document.documentElement.requestFullscreen(),50);';%0A">Web fullscreen
</a></p>
64 <p>Long pressing the bookmark button in
<a href=
"../index.html#">uweb browser
</a> will popup menus defined in file
"default.link
". The file format is as follows:
<br>
65 [Menu name]:[one or more links delimited by
" \n
"]
</p>
66 <p>and each link has the following format:
<br>
67 [url][space][javascript code]
</p>
68 <p>in which space and later parts are optional. url and later parts support
<a href=
"../cmd/index.html#">"%u
",
"%s
" etc.
</a>. The javascript code will be executed after url is fully loaded.
</p>
69 <p>url supports all standard scheme (http(s):,javascript: etc.) and uweb internal schemes ( ':' as second character in the url ) and special links that begins with ':'.
</p>
70 <p>uweb browser will handle local file urls (file:///) specially for some file types:
</p>
72 <li>.js file(same as
<a href=
"../longclick/index.html#">long pressing hypertext to execute js file
</a>): If the
".js
" file begins with
"//
", then uweb browser will load the site following
"//
" and execute the following js code.
</li>
74 <p>If the above mentioned [links] part is malformated, then it is auto detected as html or text.
</p>
75 <p><a href=
"../gesture/index.html#">default.gesture
</a> and default.button have the exactly same file format.
".gesture
" files define gestures while
".button
" define bottom toolbar button pressing actions from the last button to the first.
</p>
77 httpproxy::
010[proxy host]:[port]
<br>
78 socks5::
011[socks host]:[port]
<br>
80 <h3 id=
"special-links-beginning-with-">special links beginning with ':'
</h3>
84 Toggle fullscreen mode
</p>
92 Scan the fileurl and add it to media storage
</p>
95 <p>:
010[proxy host]:[port]
<br>
96 Config http proxy,
":
010:
" to disable any proxy.
</p>
99 <p>:
011[socks host]:[port]
<br>
103 <p>:
0cc[url1]:[url2][:;[cookie attributes]]
<br>
104 cookie copy from url1 to url2, the last part
"[:;[cookie attributes]]
" is optionable.
</p>
107 <h4 id=
"commands">commands
</h4>
110 <p>:![command line]
<br>
111 The command line could be a
".js
",
".sh
" or other executable with arguments. Ex.
":!s g keyword
" could invoke
"s.js
" executable with the whole string as arguments (
"s.sh
" or
"s
" if file exists, here
"g
" as google search engine);
":! g keyword
" would invoke the file
".js
" or
".sh
" as executable.
</p>
112 <p>For regular (non-js) executables, the standard output of the command line will be treated as lines of web urls.
</p>
113 <p><a href=
"i:0hs.sh:../searchurl/txt/web.sh">Click to install the example file
"s.sh
"</a><br>
114 <a href=
"i:0h.js:../searchurl/txt/web.js">Click to install the example file
".js
"</a></p>
120 ":cclose
" to close the current window/tab.
</li>
121 <li>profile [parent folder] [file/folder] [optional ID]
<br>
122 Ex.
":cprofile . files
" to switch configurations
</li>
126 <p>:p [width in milliInch]x[height] [top margin]:[right margin]:[bottom margin]:[left margin]
<br>
127 Generate/Print PDF file in the
"/sdcard/Download
" folder, all units are milliinch.
<br>
128 Ex.
":p x
" or
":px
" for screen width and infinite height (as long vector screenshot).
<br>
129 ":p x[height]
" or
":px[height]
" for screen width.
</p>
132 <h3 id=
"i-internal-links">"i:
" internal links:
</h3>
135 <p>i:
0b[path]:[url]
<br>
136 Extract remote content (tar/tgz/zip) under the folder [path]. If [path] ends with
"/
", then put unzipped file under the folder
"[path]/[file name stem]
" (for zipped files only, not for tar/tgz).
</p>
139 <p>i:
0m[bookmarklet index|prefix|?postfix|/.../localfile|H[headers]|c[cssFlag]]:[url]
<br>
140 Visiting url and execute the uweb browser internal bookmarklet that keeps valid for all urls under the path of [url].
</p>
142 <li>[bookmarklet index] must have two/three digits. The first two digits are used as index of bootmarklet. For example,
"00" as the first local bookmarklet;
"01" as the first remote script; then
"02" as the second local bookmarklet, ... The third digit is uplevel,
1 to make bookmarklet valid for parent path of [url].
</li>
143 <li>c[cssFlag]: For example,
"c12
" will apply the third and fourth global CSS (
12=
2^
2+
2^
3).
</li>
144 <li>H[headers]: Ex.
"HX-Forwarded-For;
8.8.8.8" adds extra http request header
"X-Forwarded-For:
8.8.8.8".
</li>
145 <li>[?postfix]: the real visited url is
"[url]+[?postfix]
".
</li>
146 <li>[/.../localfile]: load the local html/js file that processes [url]. The first character of the local html file must be
"<".
</li>
147 <li>All other cases will be treated as [prefix], the real visited url is
"[prefix]+[url]
".
</li>
148 <li>Since
<a href=
"../rjs/index.html#">activated scripts
</a> use internal mechanism of
"i:
0m
" urls, the script itself cannot have 'H', '?' as its very first character.
</li>
153 Set address bar text to be [string].
</p>
156 <p>i:
16[mimetype]:[Action Name]:[App Name]:[Activity Name]
<br>
157 Use third party app as input
</p>
160 <p>i:
18[extended mimetype]:[range]:[url]
<br>
161 Read partial data from url.
<br>
162 <range>: the format is same as related http header, such as
"500-
1000,-
300".
<br>
163 <extended mimetype
>: standard mimetype or mimetype followed by
".
<filename>". In the later case, the file in uweb configuration folder will be appended to the fetched data.
</p>
167 Append [string] to the address bar text.
</p>
171 Show web certificate.
</p>
174 <p>i:
1d
<action>:
<type>:
<Category>:
<data><br>
175 Launch app for specific
<action>.
</p>
179 Wait to receive url from the network and open the url.
</p>
183 Wait to receive url from the network and open the url (not showing ip)
</p>
187 Open file manager for removable SDCARD download folder
</p>
190 <p>i:
50[path]:[string]
<br>
191 Save [string] as file
</p>
194 <p>i:
51[path]:[url]
<br>
195 Save [url] to
".autoc
" file.
</p>
198 <p>i:
52[path]:[url]
<br>
202 <p>i:
53[path]:[string]
<br>
206 <p>i:
54[path]:[url]
<br>
207 Save as search engine.
</p>
210 <p>i:
55[path]:[url]
<br>
215 Use [string] as user input on web page.
<br>
216 The string can have any character such as ascii code
0-
26, where code
0 means clear, and code
1-
26 are from ctrl-A to ctrl-Z as shortcut keys. (to type
"Ctrl-A
" into a text file, use
"Ctrl-Q Ctrl-A
" with emacs or
"Ctrl-V Ctrl-A
" with vim)
</p>
220 execute [jscode], even when js is disabled for the web page.
</p>
224 Save to the desktop.
</p>
227 <p>i:
5a[filename]
<br>
228 Receive content from network to the file.
</p>
232 Copy [string] to the clipboard.
</p>
236 Change auto page turning internal url to be [url].
</p>
239 <p>i:
5d[file url]
<br>
240 Open the file url compatible to other browsers.
</p>
247 <p>i:
5f[videourl]
<br>
248 play video fullscreen. if videourl is empty, then make following requestFullscreen() work.
</p>
251 <p>i:
5h[?postfix:|/regex/replacement:|encoding:][url]
<br>
252 force html for [url] visiting
</p>
254 <li>[?postfix:] : the real url visited is
"[url]+[?postfix]
"</li>
255 <li>[/regex/replacement:]: execute regular expression replacement for the
"[url]
", then visit the resulting url.
</li>
256 <li>[encoding:]: force web page encoding.
</li>
261 Use the existing tab for the url with possible different url hash part.
</p>
265 if [string] is file url, then send the file/folder to network, otherwise send [string] to network.
</p>
268 <p>i:
5p[videourl]
<br>
269 play video in external player
</p>
272 <p>i:
60[path]:[url]
<br>
273 If existing local file, then open it or visit the [url].
</p>
276 <p>i:
62[path]:[js code]
<br>
277 Evaluate the [js code] and save the returned string to file.
</p>
280 <p>i:
63[bookmarklet index]:[url]
<br>
281 Visiting url and execute the bookmarklet. Only uweb predefined local bookmarlets are allowed.
</p>
284 <p>i:
6i[js file path relative to configuration folder]:[url]
<br>
285 Similar to i:
5i, except executing the js file after possible url hash change.
</p>
288 <p>i:
70[url]:[auto page turning url]
<br>
289 Visiting [url], but use the second url as auto paging url.
</p>
293 Force downloading [url]
</p>
296 <p>i:
8l[filename]
<br>
297 Loading configuration [filename]. Ex.
"i:
8lconfig.html
" to reload config.html.
</p>
300 <p>i:
92[http request headers separated by ';']:[url]
<br>
301 The
"Host
" Header (fake header, different from the standard) must be the first header.
<br>
302 Ex. i:
92Host;
209.216.230.240:https://news.ycombinator.com
<br>
303 use
"i:
0mi:
92Host;
209.216.230.240::https://news.ycombinator.com
" to visit the site with specified IP address.
</p>
306 <p>i:b1[internal urls or javascript separated by
"%
0A
"]
<br>
307 Bundle of internal urls, if it is an
"i:
0" url, then it should have the following format:
<br>
308 [title]%
0A[msg]%
0A[optional callback url%
0A][i:
0url].
</p>
313 <p>Last Modified:
19 April
2024<br>
314 add i:
5hencoding: support
<br>
315 <pre>i:
56 urls support CTRL_A to CTRL-Z
319 <script id='jsgiscus'
320 src='https://giscus.app/client.js'
321 data-repo=
"torappinfo/uweb"
322 data-repo-id=
"MDEwOlJlcG9zaXRvcnkzMDIyMDU3MjE="
323 data-category=
"Announcements"
324 data-category-id=
"DIC_kwDOEgNLGc4CQjsh"
327 data-reactions-enabled=
"1"
328 data-emit-metadata=
"0"
329 data-input-position=
"top"
333 crossorigin=
"anonymous" async
>
336 <footer class=
"site-footer">
337 <div class=
"container">
338 © 2018-
2024 Richard H. Cao
341 <!-- 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/>. -->