update AI engines
[uweb.git] / en / links / index.html
blob5434714012f77561e4360268da9a5457eb18f621
1 <!doctype html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1" />
6 <link rel="canonical" href="https://jamesfengcao.gitlab.io/uweb/en/links/" />
8 <link rel="stylesheet" href="../style.css#" type="text/css" />
9 <title>Links</title>
10 <script>
11 function findLang(){
12 let href = location.href;
13 for(let i=href.length-1;i>0;i--){
14 if('/'==href.charAt(i) && '/'==href.charAt(i-3))
15 return i;
17 return 0;
19 function nav2(page){
20 let i = findLang();
21 location.href = location.href.substring(0,i+1)+page;
23 function nav2Lang(lang){
24 let i = findLang();
25 let href = location.href;
26 location.href = location.href.substring(0,i-2)+lang+location.href.substring(i);
28 </script>
29 </head>
30 <body>
31 <header class='header'>
32 <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>
35 <a class="logo" href="javascript:void(0)" onclick="return nav2Lang('zh')">简体中文</a>
38 <nav>
39 </nav>
40 </header>
41 <br />
43 <div class="container">
44 <h1 class="title">Links
45 <br>
46 <span class="subtitle"></span>
47 </h1>
48 <ul class="tags">
50 </ul>
51 <p>Click the following links to install menus popped by long pressing the bookmark button (with star as icon):<br>
52 <a href="i:0gdefault.link::Input::cinput%0A">Select utf8 text file as keyboard input</a></p>
53 <p><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>
54 <p><a href="i:0gdefault.link:../searchurl/txt/link.cfg">Select All:CTRL-A/undo:CTRL-Z/Redo:CTRL-Y</a><br>
55 <a href="i:0gdefault.link::Extend cookies::0cc;Max-Age=315360000%0A">Extend site cookies to 10 years</a><br>
56 <a href="i:0gdefault.link::Clear cookies::0cc;Max-Age=0%0A">Clear site cookies</a></p>
57 <p><a href="i:0gdefault.link::vpn:i:1dandroid.net.vpn.SETTINGS:::%0A">VPN</a></p>
58 <p><a href="i:0gdefault.link::profile_config::cprofile . files .conf%0A">Switch configuration</a></p>
59 <p><a href="i:0gdefault.link::Wait msg:i:1w%0A">Wait for network msg</a></p>
60 <p><a href="i:0gdefault.link::Certificate info:i:1c%0A">Certificate info</a></p>
61 <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>
62 <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>
63 <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>
64 <p><a href="../searchurl/webdav.html">More webdav link menu items</a></p>
65 <p><a href="i:0gdefault.link::web fullscreen: location.href='i:5fsetTimeout(()=>document.documentElement.requestFullscreen(),50);';%0A">Web fullscreen</a></p>
66 <p>Long pressing the bookmark button in <a href="../index.html#">uweb browser</a> will popup menus defined in file &quot;default.link&quot;. The file format is as follows:<br>
67 [Menu name]:[one or more links delimited by &quot; \n &quot;]</p>
68 <p>and each link has the following format:<br>
69 [url][space][javascript code]</p>
70 <p>in which space and later parts are optional. url and later parts support <a href="../cmd/index.html#">&quot;%u&quot;,&quot;%s&quot; etc.</a>. The javascript code will be executed after url is fully loaded.</p>
71 <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>
72 <p>uweb browser will handle local file urls (file:///) specially for some file types:</p>
73 <ul>
74 <li>.js file(same as <a href="../longclick/index.html#">long pressing hypertext to execute js file</a>): If the &quot;.js&quot; file begins with &quot;//&quot;, then uweb browser will load the site following &quot;//&quot; and execute the following js code.</li>
75 </ul>
76 <p>If the above mentioned [links] part is malformated, then it is auto detected as html or text.</p>
77 <p><a href="../gesture/index.html#">default.gesture</a> and default.button have the exactly same file format. &quot;.gesture&quot; files define gestures while &quot;.button&quot; define bottom toolbar button pressing actions from the last button to the first.</p>
78 <p>proxy config:<br>
79 httpproxy::010[proxy host]:[port]:[username]:[password]<br>
80 socks5::011[socks host]:[port]:[username]:[password]<br>
81 noproxy::010:</p>
82 <h3 id="special-links-beginning-with-">special links beginning with ':'</h3>
83 <ul>
84 <li>
85 <p>:0003<br>
86 Toggle fullscreen mode</p>
87 </li>
88 <li>
89 <p>:0004<br>
90 Rotate the screen</p>
91 </li>
92 <li>
93 <p>:001[fileurl]<br>
94 Scan the fileurl and add it to media storage</p>
95 </li>
96 <li>
97 <p>:010[proxy host]:[port]:[username]:[password]<br>
98 Config http proxy, &quot;:010:&quot; to disable any proxy.<br>
99 &quot;:[username]:[password]&quot; is optional.</p>
100 </li>
101 <li>
102 <p>:011[socks host]:[port]:[username]:[password]<br>
103 Socks proxy, &quot;:[username]:[password]&quot; is optional.</p>
104 </li>
105 <li>
106 <p>:0cc[url1]:[url2][:;[cookie attributes]]<br>
107 cookie copy from url1 to url2, the last part &quot;[:;[cookie attributes]]&quot; is optionable.</p>
108 </li>
109 </ul>
110 <h4 id="commands">commands</h4>
111 <ul>
112 <li>
113 <p>:![command line]<br>
114 The command line could be a &quot;.js&quot;, &quot;.sh&quot; or other executable with arguments. Ex. &quot;:!s g keyword&quot; could invoke &quot;s.js&quot; executable with the whole string as arguments (&quot;s.sh&quot; or &quot;s&quot; if file exists, here &quot;g&quot; as google search engine); &quot;:! g keyword&quot; would invoke the file &quot;.js&quot; or &quot;.sh&quot; as executable.</p>
115 <p>For regular (non-js) executables, the standard output of the command line will be treated as lines of web urls.</p>
116 <p><a href="i:0hs.sh:../searchurl/txt/web.sh">Click to install the example file &quot;s.sh&quot;</a><br>
117 <a href="i:0h.js:../searchurl/txt/web.js">Click to install the example file &quot;.js&quot;</a></p>
118 </li>
119 <li>
120 <p>:c[command]</p>
121 <ul>
122 <li>close<br>
123 &quot;:cclose&quot; to close the current window/tab.</li>
124 <li>input [path]<br>
125 &quot;:cinput&quot; to select utf8 file as keyboard input</li>
126 <li>profile [parent folder] [file/folder] [optional ID]<br>
127 Ex. &quot;:cprofile . files&quot; to switch configurations</li>
128 <li>set [key] [value]<br>
129 [key] could be one of the followings:
130 <ul>
131 <li>redirecturl</li>
132 </ul>
133 </li>
134 </ul>
135 </li>
136 <li>
137 <p>:p [width in milliInch]x[height] [top margin]:[right margin]:[bottom margin]:[left margin]<br>
138 Generate/Print PDF file in the &quot;/sdcard/Download&quot; folder, all units are milliinch.<br>
139 Ex. &quot;:p x&quot; or &quot;:px&quot; for screen width and infinite height (as long vector screenshot).<br>
140 &quot;:p x[height]&quot; or &quot;:px[height]&quot; for screen width.</p>
141 </li>
142 </ul>
143 <h3 id="i-internal-links">&quot;i:&quot; internal links:</h3>
144 <ul>
145 <li>
146 <p>i:0b[path]:[url]<br>
147 Extract remote content (tar/tgz/zip) under the folder [path]. If [path] ends with &quot;/&quot;, then put unzipped file under the folder &quot;[path]/[file name stem]&quot; (for zipped files only, not for tar/tgz).</p>
148 </li>
149 <li>
150 <p>i:0m[-|1-9][bookmarklet index|prefix|?postfix|/.../localfile|H[headers]|c[cssFlag]]:[url]<br>
151 Visiting url and execute the uweb browser internal bookmarklet that keeps valid for all urls under the parent path of [url].</p>
152 <ul>
153 <li>[-|1-9] is optional single character. '-' to limit bookmarklet work only for urls with same path (could be different query strings). The digit is uplevel, 1 to make bookmarklet valid for parent path of [url].</li>
154 <li>[bookmarklet index] must have two digits. They are used as index of bootmarklet. For example, &quot;00&quot; as the first local bookmarklet; &quot;01&quot; as the first remote script; then &quot;02&quot; as the second local bookmarklet, ...</li>
155 <li>c[cssFlag]: For example, &quot;c12&quot; will apply the third and fourth global CSS (12=2^2+2^3).</li>
156 <li>H[headers]: Ex. &quot;HX-Forwarded-For;8.8.8.8&quot; adds extra http request header &quot;X-Forwarded-For:8.8.8.8&quot;.</li>
157 <li>[?postfix]: the real visited url is &quot;[url]+[?postfix]&quot;.</li>
158 <li>[/.../localfile]: load the local html/js file that processes [url]. The first character of the local html file must be &quot;&lt;&quot;.</li>
159 <li>All other cases will be treated as [prefix], the real visited url is &quot;[prefix]+[url]&quot;.</li>
160 <li>Since <a href="../rjs/index.html#">activated scripts</a> use internal mechanism of &quot;i:0m&quot; urls, the script itself cannot have 'H', '?' as its very first character.</li>
161 </ul>
162 </li>
163 <li>
164 <p>i:15[string]<br>
165 Set address bar text to be [string].</p>
166 </li>
167 <li>
168 <p>i:16[mimetype]:[Action Name]:[App Name]:[Activity Name]<br>
169 Use third party app as input</p>
170 </li>
171 <li>
172 <p>i:18[extended mimetype]:[range]:[url]<br>
173 Read partial data from url.<br>
174 <range>: the format is same as related http header, such as &quot;500-1000,-300&quot;.<br>
175 <extended mimetype>: standard mimetype or mimetype followed by &quot;.<filename>&quot;. In the later case, the file in uweb configuration folder will be appended to the fetched data.</p>
176 </li>
177 <li>
178 <p>i:19[string]<br>
179 Append [string] to the address bar text.</p>
180 </li>
181 <li>
182 <p>i:1c<br>
183 Show web certificate.</p>
184 </li>
185 <li>
186 <p>i:1d<action>:<type>:<Category>:<data><br>
187 Launch app for specific <action>.</p>
188 </li>
189 <li>
190 <p>i:1w<br>
191 Wait to receive url from the network and open the url.</p>
192 </li>
193 <li>
194 <p>i:1w1<br>
195 Wait to receive url from the network and open the url (not showing ip)</p>
196 </li>
197 <li>
198 <p>i:1e<br>
199 Open file manager for removable SDCARD download folder</p>
200 </li>
201 <li>
202 <p>i:50[path]:[string]<br>
203 Save [string] as file</p>
204 </li>
205 <li>
206 <p>i:51[path]:[url]<br>
207 Save [url] to &quot;.autoc&quot; file.</p>
208 </li>
209 <li>
210 <p>i:52[path]:[url]<br>
211 Save bookmark.</p>
212 </li>
213 <li>
214 <p>i:53[path]:[string]<br>
215 Save notes.</p>
216 </li>
217 <li>
218 <p>i:54[path]:[url]<br>
219 Save as search engine.</p>
220 </li>
221 <li>
222 <p>i:55[path]:[url]<br>
223 Save as link.</p>
224 </li>
225 <li>
226 <p>i:56[string]<br>
227 Use [string] as user input on web page.<br>
228 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 &quot;Ctrl-A&quot; into a text file, use &quot;Ctrl-Q Ctrl-A&quot; with emacs or &quot;Ctrl-V Ctrl-A&quot; with vim)</p>
229 </li>
230 <li>
231 <p>i:57[jscode]<br>
232 execute [jscode], even when js is disabled for the web page.</p>
233 </li>
234 <li>
235 <p>i:58[url]<br>
236 Save to the desktop.</p>
237 </li>
238 <li>
239 <p>i:5a[filename]<br>
240 Receive content from network to the file.</p>
241 </li>
242 <li>
243 <p>i:5b[string]<br>
244 Copy [string] to the clipboard.</p>
245 </li>
246 <li>
247 <p>i:5c[url]<br>
248 Change auto page turning internal url to be [url].</p>
249 </li>
250 <li>
251 <p>i:5d[file url]<br>
252 Open the file url compatible to other browsers.</p>
253 </li>
254 <li>
255 <p>i:5e[string]<br>
256 TTS</p>
257 </li>
258 <li>
259 <p>i:5f[videourl]<br>
260 play video fullscreen. if videourl is empty, then make following requestFullscreen() work.</p>
261 </li>
262 <li>
263 <p>i:5h[?postfix:|/regex/replacement:|encoding:][url]<br>
264 force html for [url] visiting</p>
265 <ul>
266 <li>[?postfix:] : the real url visited is &quot;[url]+[?postfix]&quot;</li>
267 <li>[/regex/replacement:]: execute regular expression replacement for the &quot;[url]&quot;, then visit the resulting url.</li>
268 <li>[encoding:]: force web page encoding.</li>
269 </ul>
270 </li>
271 <li>
272 <p>i:5i[url]<br>
273 Use the existing tab for the url with possible different url hash part.</p>
274 </li>
275 <li>
276 <p>i:5j[string]<br>
277 if [string] is file url, then send the file/folder to network, otherwise send [string] to network.</p>
278 </li>
279 <li>
280 <p>i:5p[videourl]<br>
281 play video in external player</p>
282 </li>
283 <li>
284 <p>i:60[path]:[url]<br>
285 If existing local file, then open it or visit the [url].</p>
286 </li>
287 <li>
288 <p>i:62[path]:[js code]<br>
289 Evaluate the [js code] and save the returned string to file.</p>
290 </li>
291 <li>
292 <p>i:63[bookmarklet index]:[url]<br>
293 Visiting url and execute the bookmarklet. Only uweb predefined local bookmarlets are allowed.</p>
294 </li>
295 <li>
296 <p>i:6i[js file path relative to configuration folder]:[url]<br>
297 Similar to i:5i, except executing the js file after possible url hash change.</p>
298 </li>
299 <li>
300 <p>i:70[url]:[auto page turning url]<br>
301 Visiting [url], but use the second url as auto paging url.</p>
302 </li>
303 <li>
304 <p>i:8d[url]<br>
305 Force downloading [url]</p>
306 </li>
307 <li>
308 <p>i:8l[filename]<br>
309 Loading configuration [filename]. Ex. &quot;i:8lconfig.html&quot; to reload config.html.</p>
310 </li>
311 <li>
312 <p>i:92[http request headers separated by ';']:[url]<br>
313 The &quot;Host&quot; Header (fake header, different from the standard) must be the first header.<br>
314 Ex. i:92Host;209.216.230.240:https://news.ycombinator.com<br>
315 use &quot;i:0mi:92Host;209.216.230.240::https://news.ycombinator.com&quot; to visit the site with specified IP address.</p>
316 </li>
317 <li>
318 <p>i:b1[internal urls or javascript separated by &quot;%0A&quot;]<br>
319 Bundle of internal urls, if it is an &quot;i:0&quot; url, then it should have the following format:<br>
320 [title]%0A[msg]%0A[optional callback url%0A][i:0url].</p>
321 </li>
322 </ul>
324 </div>
325 <p>Last Modified: 10 December 2024<br>
326 update README<br>
327 <pre>i:56 urls support CTRL_A to CTRL-Z
328 </pre>
329 </p>
331 <script id='jsgiscus'
332 src='https://giscus.app/client.js'
333 data-repo="torappinfo/uweb"
334 data-repo-id="MDEwOlJlcG9zaXRvcnkzMDIyMDU3MjE="
335 data-category="Announcements"
336 data-category-id="DIC_kwDOEgNLGc4CQjsh"
337 data-mapping="title"
338 data-strict="0"
339 data-reactions-enabled="1"
340 data-emit-metadata="0"
341 data-input-position="top"
342 data-theme="light"
343 data-lang="en"
344 data-loading="lazy"
345 crossorigin="anonymous" async>
346 </script>
348 <footer class="site-footer">
349 <div class="container">
350 &copy; 2018-2025 Richard H. Cao
351 </div>
352 </footer>
353 <!-- 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/>. -->
356 </body>
357 </html>