use relative path

This commit is contained in:
James Feng Cao 2023-02-20 22:03:43 +08:00
parent cd12841352
commit 8fde5df446
18 changed files with 147 additions and 32 deletions

View File

@ -49,6 +49,9 @@ The command line could be a ".js", ".sh" or other executable
<p>For regular (non-js) executables, the standard output of the command line could be treated as lines of urls (or html, plain text).</p>
<p><a href="i:0h.js:../searchurl/txt/web.js">Install the example file &quot;.js&quot; (supporting search engine bundle)</a><br>
<a href="i:0hs.sh:../searchurl/txt/web.sh">Install the example file &quot;s.sh&quot;</a></p>
<p>Click the following links to make commands appear in address bar, then press &quot;enter&quot; to execute:<br>
<a href="i:15:!cd /data/data/com.termux/files/home;ln -s ../../../info.torapp.uweb/files uweb">Make uweb configuration folder accessible by file managers with termux installed</a><br>
(<a href="https://wiki.termux.com/wiki/Internal_and_external_storage">File manager list at end of the page</a>)</p>
<h3 id="address-bar-command-modes">Address bar command modes</h3>
<p><a href="../cmds/index.html">Commands</a> are the best for repeated execution of an instruction. Address bar command modes provide ways to run different commands in the same category easily.</p>
<p>The configure file &quot;default.acmd&quot; has the exactly same format as <a href="../cmds/index.html">default.cmds</a>. Click the following links to install new modes (cold start the app to take effect, then long click the &quot;refresh&quot; button to switch modes):</p>
@ -58,10 +61,6 @@ The command line could be a &quot;.js&quot;, &quot;.sh&quot; or other executable
output;plot %25s'%0A">GNUPlot plot (2D function), needs uweb adapted termux &amp; gnuplot</a></p>
<p><a href="i:0gdefault.acmd::plot 3D function:image/svg%2Bxml:gnuplot -e 'set term svg;set
output;splot %25s'%0A">GNUPlot plot (3D function), needs uweb adapted termux &amp; gnuplot</a></p>
<h4 id="shell-command-mode">Shell command mode</h4>
<p>Click the following links to make commands appear in address bar, then press &quot;enter&quot; to execute:<br>
<a href="i:15cd /data/data/com.termux/files/home;ln -s ../../../info.torapp.uweb/files uweb">Make uweb configuration folder accessible by file managers with termux installed</a><br>
(<a href="https://wiki.termux.com/wiki/Internal_and_external_storage">File manager list at end of the page</a>)</p>
</div>

View File

@ -68,7 +68,7 @@
</ul>
</li>
<li>
<p>Long press the setting button, check the option &quot;Block external scripts&quot;. <a href="i:61:https://fastly.jsdelivr.net/gh/torappinfo/uweb/en/searchurl/func.html">UI</a> website has option to also block dubious 3rd party resources. <a href="file:///data/data/info.torapp.uweb/files/js.allow">js.allow</a> whitelists js libraries.</p>
<p>Long press the setting button, check the option &quot;Block external scripts&quot;. <a href="i:61:../searchurl/func.html">UI</a> website has option to also block dubious 3rd party resources. <a href="file:///data/data/info.torapp.uweb/files/js.allow">js.allow</a> whitelists js libraries.</p>
</li>
<li>
<p>Long press the button [☰], &quot;Disable floating ADs&quot;, &quot;Disable banners&quot;, &quot;clear all timers&quot;, &quot;stop events&quot; and &quot;Sleep ...&quot; are also available.</p>

View File

@ -78,7 +78,7 @@ Click to install the following html5 apps:<br>
<p>With the first approach, the html5 application is installed locally and can read any file allowed by the OS; while in the second approach, the html5 application can be either local or remote, and only files under the subfolder &quot;app&quot; can be accessed; The third approach allows easy access of other external resources (ex. local media).</p>
<h4 id="open-local-files-with-html5-apps">Open local files with html5 apps</h4>
<p>Click to configure <a href="../filecap/index.html">default.filecap</a> to open local files, and to open remote files with the option &quot;custom file handling&quot;:<br>
<a target="_self" href="i:0gdefault.filecap:https://fastly.jsdelivr.net/gh/torappinfo/uweb/zh/searchurl/txt/filecap.cfg">use pdf.js,djvu.js,epub.js, huge markdown viewer for local files</a></p>
<a target="_self" href="i:0gdefault.filecap:../../zh/searchurl/txt/filecap.cfg">use pdf.js,djvu.js,epub.js, huge markdown viewer for local files</a></p>
<p>url examples are as follows:</p>
<ul>
<li>file:///data/user/0/info.torapp.uweb/files/app/pdfviewer.html?file=[path].pdf#page=[xxx]</li>

View File

@ -297,7 +297,7 @@ Clear logcat::logcat -c</description>
<guid>/en/rjs/</guid>
<description>javascript for domains
Global javascript files locates in the subfolder &amp;quot;js&amp;quot; of app private folder. Long press button [☰] to configure. Click the following links to install:
&amp;lt;a target=_self&amp;quot; href=&amp;quot;i:0hjs/savePassword.js:https://fastly.jsdelivr.net/gh/torappinfo/uweb/zh/searchurl/txt/passwdsave.js&amp;quot;&amp;gt;Save password
&amp;lt;a target=_self&amp;quot; href=&amp;quot;i:0hjs/savePassword.js:../../zh/searchurl/txt/passwdsave.js&amp;quot;&amp;gt;Save password
Instant page
large size javascript code can be installed to the folder &amp;quot;bookmarklet&amp;quot; (long pressing button &amp;quot;js&amp;quot; to popup menu):
Eruda

View File

@ -78,7 +78,7 @@ It formats as &quot;[input mimetype]/[output mimetype]&quot;.<br>
<li>&quot;uweb&quot;: output as a link</li>
<li>&quot;termux&quot;: output as termux command</li>
</ul>
<p><a target="_self" href="i:0hcheck.js:https://fastly.jsdelivr.net/gh/torappinfo/uweb/zh/searchurl/txt/check.js">checked.js</a>: Evaluate checked.js and return value as standard input for the command line. For any file url ending with &quot;/&quot;, optionally append &quot;?[prefix][<em>[postfix]]&quot;. For example, &quot;file:///sdcard/?</em>.png&quot; lists all .png files under the folder &quot;/sdcard&quot;. Select files and process them with checked.js(such as &quot;copy to PC&quot; as the later example).</p>
<p><a target="_self" href="i:0hcheck.js:../../zh/searchurl/txt/check.js">checked.js</a>: Evaluate checked.js and return value as standard input for the command line. For any file url ending with &quot;/&quot;, optionally append &quot;?[prefix][<em>[postfix]]&quot;. For example, &quot;file:///sdcard/?</em>.png&quot; lists all .png files under the folder &quot;/sdcard&quot;. Select files and process them with checked.js(such as &quot;copy to PC&quot; as the later example).</p>
<p>default.select sample file:<br>
copy2addressbar:/uweb:printf i:15;cat<br>
copy2PCClipboard::ssh [user:password]@192.168.2.102 &quot;DISPLAY=:0 xsel -i&quot;<br>

View File

@ -52,7 +52,7 @@
<p>Click the following links to append mirrors to the file &quot;default.redirect&quot;:<br>
<a href="i:0gdefault.redirect::github.com::hub.fastgit.xyz%0A">github mirror:fastgit</a><br>
<a href="i:0gdefault.redirect::github.com::hub.0z.gs%0A">github mirror 2</a></p>
<p><a target="_self" href="i:0gdefault.redirect:http://fastly.jsdelivr.net/gh/torappinfo/uweb/zh/searchurl/txt/redirect.cfg">google recaptcha mirror</a></p>
<p><a target="_self" href="i:0gdefault.redirect:../../zh/searchurl/txt/redirect.cfg">google recaptcha mirror</a></p>
<p>Each line of the file &quot;default.redirect&quot; has the following format:<br>
[domain name]:[regular expression]:[replacement expression]</p>
<p>in which &quot;[regular expression]&quot; is as defined by java language, and cannot have &quot;:&quot; inside; if empty, it defaults to be same as &quot;[domain name]&quot;.</p>

View File

@ -49,7 +49,7 @@
</ul>
<p><a href="../sitejs/index.html">javascript for domains</a><br>
<b>Global javascript</b> files locates in the subfolder &quot;js&quot; of app private folder. Long press button [☰] to configure. Click the following links to install:<br>
&lt;a target=_self&quot; href=&quot;i:0hjs/savePassword.js:https://fastly.jsdelivr.net/gh/torappinfo/uweb/zh/searchurl/txt/passwdsave.js&quot;&gt;Save password</a><br>
&lt;a target=_self&quot; href=&quot;i:0hjs/savePassword.js:../../zh/searchurl/txt/passwdsave.js&quot;&gt;Save password</a><br>
<a target="_self" href="i:0hjs/instantPage.js:https://fastly.jsdelivr.net/npm/instant.page">Instant page</a></p>
<p><b>large size javascript code</b> can be installed to the folder &quot;bookmarklet&quot; (long pressing button &quot;js&quot; to popup menu):<br>
<a target="_self" href='i:0hbookmarklet/eruda.js:https://fastly.jsdelivr.net/npm/eruda:%0Aeruda.init()'>Eruda</a><br>
@ -59,6 +59,7 @@
<p><a href="i:04Selection to line:;let g='line';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);">Selection to line:;let g='line';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);</a></p>
<p><a href="i:04Selection to paragraph:;let g='paragraph';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);">Selection to paragraph:;let g='paragraph';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);</a></p>
<p><a href="i:04markdown:['https://cdn.jsdelivr.net/npm/showdown/dist/showdown.min.js'];var d=document;var md=d.querySelector('pre').innerText;var c=new showdown.Converter({emoji:true,underline:true,});c.setFlavor('github');d.body.innerHTML=c.makeHtml(md);d.title=d.title||d.body.firstElementChild.innerText.trim();">markdown:['https://cdn.jsdelivr.net/npm/showdown/dist/showdown.min.js'];var d=document;var md=d.querySelector('pre').innerText;var c=new showdown.Converter({emoji:true,underline:true,});c.setFlavor('github');d.body.innerHTML=c.makeHtml(md);d.title=d.title||d.body.firstElementChild.innerText.trim();</a></p>
<p><a href="i:04mermaid:;loadModuleJS(`import mermaid from 'https://unpkg.com/mermaid/dist/mermaid.esm.min.mjs';mermaid.initialize({startOnLoad:true});`)">mermaid:;loadModuleJS(<code>import mermaid from 'https://unpkg.com/mermaid/dist/mermaid.esm.min.mjs';mermaid.initialize({startOnLoad:true});</code>)</a></p>
<p><a href="i:04mathjax:['https://fastly.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js']">mathjax:['https://fastly.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js']</a></p>
<p><a href="i:04New tab to open links:;let d=document;b=d.createElement('base');b.setAttribute('target','_blank');d.head.appendChild(b)">New tab to open links:;let d=document;b=d.createElement('base');b.setAttribute('target','_blank');d.head.appendChild(b)</a></p>
<p><a href="i:04Site search:;open('i:15site:' + location.hostname)">Site search:;open('i:15site:' + location.hostname)</a></p>

View File

@ -131,7 +131,7 @@ Clear logcat::logcat -c</description>
<guid>/en/rjs/</guid>
<description>javascript for domains
Global javascript files locates in the subfolder &amp;quot;js&amp;quot; of app private folder. Long press button [☰] to configure. Click the following links to install:
&amp;lt;a target=_self&amp;quot; href=&amp;quot;i:0hjs/savePassword.js:https://fastly.jsdelivr.net/gh/torappinfo/uweb/zh/searchurl/txt/passwdsave.js&amp;quot;&amp;gt;Save password
&amp;lt;a target=_self&amp;quot; href=&amp;quot;i:0hjs/savePassword.js:../../zh/searchurl/txt/passwdsave.js&amp;quot;&amp;gt;Save password
Instant page
large size javascript code can be installed to the folder &amp;quot;bookmarklet&amp;quot; (long pressing button &amp;quot;js&amp;quot; to popup menu):
Eruda

View File

@ -75,7 +75,7 @@
</ul>
</li>
<li>
<p>长按设置,选取&quot;拦截外链脚本&quot;。可在<a href="i:61:https://fastly.jsdelivr.net/gh/torappinfo/uweb/zh/searchurl/func.html">界面配置及杂项</a>网页额外拦截第三方可疑资源。可<a href="file:///data/data/info.torapp.uweb/files/js.allow">配置白名单js.allow</a></p>
<p>长按设置,选取&quot;拦截外链脚本&quot;。可在<a href="i:61:../zh/searchurl/func.html">界面配置及杂项</a>网页额外拦截第三方可疑资源。可<a href="file:///data/data/info.torapp.uweb/files/js.allow">配置白名单js.allow</a></p>
</li>
<li>
<p>长按[☰]按钮可隐藏浮动信息,移除横幅,清空定时器(防止定时触发不良信息),中断可疑事件(防止用户操作触发),等待(防止延迟触发)。</p>

View File

@ -64,7 +64,7 @@
相应的菜单安装可见<a href="../urls/index.html">浏览器特色服务</a></p>
<p>超微配置目录下的子目录名如果以&quot;app&quot;开始(譬如&quot;appPDF&quot;),则这些&quot;app&quot;开头目录树下放置的html5应用将可获得功能增强。</p>
<p><a href="../filecap/index.html">配置default.filecap</a>并打开选项“文件预处理”,清后台重启浏览器后超微可直接阅读应用对应格式文件。<br>
<a target="_self" href="i:0gdefault.filecap:https://fastly.jsdelivr.net/gh/torappinfo/uweb/zh/searchurl/txt/filecap.cfg">点击配置pdf.js,djvu.js,epub.js,超大文件阅读器</a></p>
<a target="_self" href="i:0gdefault.filecap:../searchurl/txt/filecap.cfg">点击配置pdf.js,djvu.js,epub.js,超大文件阅读器</a></p>
<p>超大文件阅读器txtview.html url如下:<br>
file:///data/user/0/info.torapp.uweb/files/app/txtview.html?url=[url]#page=[xxx]<br>
file:///data/user/0/info.torapp.uweb/files/app/txtview.html?url=[url]#offset=[xxxx]&amp;[length]<br>

View File

@ -406,16 +406,14 @@ c[cssFlag]: For example, &amp;quot;c12&amp;quot; will apply the third and fourth
<description>特定网址用户脚本
全局脚本位于js子目录, 长按[☰]按钮配置。点击以下链
接安装:
&amp;lt;a target=_self&amp;quot; href=&amp;quot;i:0hjs/记住密码.js:https://fastly.jsdelivr.net/gh/torappinfo/uweb/searchurl/txt/passwdsave.js&amp;quot;&amp;gt;记住密码
&amp;lt;a target=_self&amp;quot; href=&amp;quot;i:0hjs/记住密码.js:../searchurl/txt/passwdsave.js&amp;quot;&amp;gt;记住密码
极速网页
大型脚本可安装到&amp;quot;bookmarklet&amp;quot;目录下长按js按钮
google翻译
Eruda
彩云小译
Performance
移除覆盖物
远程脚本配置文件default.rjs样列如下点击以下链接自动安装 (清空后台重启浏览器,长按搜索按钮,则弹出远程脚本菜单)
彩云小译:[&#39;https://caiyunapp.com/dest/trs.js&#39;]
Selection to sentence:;let g=&#39;sentence&#39;;getSelection().modify(&#39;move&#39;,&#39;forward&#39;,g);getSelection().modify(&#39;extend&#39;,&#39;backward&#39;,g);
Selection to line:;let g=&#39;line&#39;;getSelection().modify(&#39;move&#39;,&#39;forward&#39;,g);getSelection().modify(&#39;extend&#39;,&#39;backward&#39;,g);
Selection to paragraph:;let g=&#39;paragraph&#39;;getSelection().modify(&#39;move&#39;,&#39;forward&#39;,g);getSelection().modify(&#39;extend&#39;,&#39;backward&#39;,g);

View File

@ -55,8 +55,8 @@
<p><a href="../../en/searchurl/webdav.html">更多 webdav ...</a></p>
<p><a href="i:0gdefault.link::迅雷盘离线:http://pan.xunlei.com/ {let rsc=setInterval(function(){var offBtn=document.querySelector('.pan-dropdown-menu.plus-menu>a:nth-child(2)');if(offBtn){clearInterval(rsc);var wsc=setInterval(function(){offBtn.click();var textarea=document.querySelector('.fileurl-input__container>textarea');if(textarea){clearInterval(wsc);textarea.value='%25u';var event=document.createEvent('HTMLEvents');event.initEvent('input',false,true);textarea.dispatchEvent(event);document.querySelector('.pan-dialog-btn__primary').click();}},200);}},1000);}%0A">迅雷盘离线</a></p>
<p><a href="i:0gdefault.link::网页全屏: location.href='i:5fsetTimeout(()=>document.documentElement.requestFullscreen(),50);';%0A">网页全屏</a></p>
<p><a href="i:0gdefault.link:https://fastly.jsdelivr.net/gh/torappinfo/uweb/zh/searchurl/txt/link.cfg">点击安装Cookie延期地址栏内删除特殊字符站内搜索seedr离线下载等</a><br>
<a href="i:0gdefault.link:https://fastly.jsdelivr.net/gh/torappinfo/uweb/zh/searchurl/txt/offline.link">点击安装离线下载(pcloud,furk,微云等)</a></p>
<p><a href="i:0gdefault.link:../searchurl/txt/link.cfg">点击安装Cookie延期地址栏内删除特殊字符站内搜索seedr离线下载等</a><br>
<a href="i:0gdefault.link:../searchurl/txt/offline.link">点击安装离线下载(pcloud,furk,微云等)</a></p>
<p><a href="i:53i:16uweb:android.intent.action.VIEW:com.coolapk.market:com.coolapk.market.view.photo.QRCodeActivity">酷安扫描</a></p>
<p><a href="../index.html">uweb浏览器</a>中长按书签按钮可弹出常用链接菜单,这些链接定义在文件&quot;default.link&quot;中,改动过的文件清后台重启动后生效。每行格式如下:<br>
[菜单名]:[url][空格][javascript脚本]<br>

View File

@ -66,7 +66,7 @@
<a href="i:0gdefault.select::搜狗翻译:/uweb:printf 'https://translate.sogou.com/text?transfrom=auto&transto=zh-CHS&model=general&keyword=';cat|tr ' ' '%2B'%0A">搜狗翻译</a></p>
<p><a href="i:0gdefault.select::彩云小译:/uweb:print 'https://fanyi.caiyunapp.com/#/ {function tE(el,t){var e=new Event(t);el.dispatchEvent(e);}let s=document.querySelector(%22textarea%22);s.value=%60';cat;print '%60;tE(s,%22input%22);tE(s,%22keyup%22)}'%0A">彩云小译</a><br>
<a href="i:0gdefault.select::deepL:/uweb:print 'https://www.deepl.com/translator {function tE(el,t){var e=new Event(t);el.dispatchEvent(e);}let s=document.querySelector(%22textarea%22);s.value=%60';cat;print '%60;tE(s,%22change%22)}'%0A">deepL</a></p>
<p><a target="_self" href="i:0gdefault.select:https://fastly.jsdelivr.net/gh/torappinfo/uweb/zh/searchurl/txt/select.cfg">点击安装&quot;保存文本&quot;</a></p>
<p><a target="_self" href="i:0gdefault.select:../searchurl/txt/select.cfg">点击安装&quot;保存文本&quot;</a></p>
<p>重启浏览器,长按“链接”按钮,将弹出菜单。若用户当前窗口并无选中文本,则选取整个页面作相应操作,否则以选中文本为准。</p>
<p>配置文件&quot;default.select&quot;定义了<a href="..">超微浏览器</a>对选中(富)文本/元素进行的操作。没有任何选中元素则以整个网页为操作对象。每行格式如下:<br>
[菜单名]:[mimetype]:[命令行]</p>

View File

@ -54,7 +54,7 @@
<p><a href="i:0gdefault.redirect::github.com::hub.fastgit.xyz%0A">github mirror:fastgit</a><br>
<a href="i:0gdefault.redirect::github.com::hub.0z.gs%0A">github mirror 2</a><br>
<a href="i:0gdefault.redirect::github.com::api.mtr.pub%0A">github mirror 3</a></p>
<p><a target="_self" href="i:0gdefault.redirect:http://fastly.jsdelivr.net/gh/torappinfo/uweb/zh/searchurl/txt/redirect.cfg">点击添加google recaptcha国内镜像</a></p>
<p><a target="_self" href="i:0gdefault.redirect:../searchurl/txt/redirect.cfg">点击添加google recaptcha国内镜像</a></p>
<p>使用服务器在国外的搜索引擎体验往往不如国内的引擎。由于网站屏蔽的原因,两者之间索引权重差别很大。国外受欢迎的技术类网站因此难以在百度上搜到;国外引擎能搜到但由于其中不少结果无法访问而体验糟糕。</p>
<p>其实,很多技术类网站在国内早有镜像,但由于镜像并非众所周知,其索引权重在百度上微不足道,非专门搜索不可得。</p>
<p>本文介绍一种技术,可重定向国外网址至国内镜像,极大的提高国外引擎的体验,让更多用户更客观的理解全球技术。</p>

View File

@ -50,16 +50,14 @@
<p><a href="../sitejs/index.html">特定网址用户脚本</a></p>
<p><b>全局脚本</b>位于js子目录, 长按[☰]按钮配置。点击以下链<br>
接安装:<br>
&lt;a target=_self&quot; href=&quot;i:0hjs/记住密码.js:https://fastly.jsdelivr.net/gh/torappinfo/uweb/searchurl/txt/passwdsave.js&quot;&gt;记住密码</a><br>
&lt;a target=_self&quot; href=&quot;i:0hjs/记住密码.js:../searchurl/txt/passwdsave.js&quot;&gt;记住密码</a><br>
<a target="_self" href="i:0hjs/极速网页.js:https://fastly.jsdelivr.net/npm/instant.page">极速网页</a></p>
<p><b>大型脚本</b>可安装到&quot;bookmarklet&quot;目录下长按js按钮<br>
<a target="_self" href="i:0hbookmarklet/google翻译.js:https://fastly.jsdelivr.net/gh/damengzhu/js1@main/element.js:%0A{let d=document,b=d.body,v=d.createElement('div');v.id='google_translate_element';v.style='position:fixed;bottom:10px;right:10px;cursor:pointer;z-index:9999';b.insertBefore(v,b.firstChild);function googleTranslateElementInit(){new google.translate.TranslateElement({layout:google.translate.TranslateElement.InlineLayout.SIMPLE,multilanguagePage:true,pageLanguage:'auto',includedLanguages:'zh-CN,zh-TW,en,ko,ja'},'google_translate_element');}}">google翻译</a></p>
<p><a target="_self" href='i:0hbookmarklet/eruda.js:https://fastly.jsdelivr.net/npm/eruda:%0Aeruda.init()'>Eruda</a><br>
<a target="_self" href="i:0hbookmarklet/彩云小译.js:https://caiyunapp.com/dest/trs.js">彩云小译</a><br>
<a target="_self" href="i:0hbookmarklet/performance.js:https://fastly.jsdelivr.net/gh/micmro/performance-bookmarklet/dist/performanceBookmarklet.min.js">Performance</a><br>
<a target="_self" href="i:0hbookmarklet/移除覆盖物.js:https://fastly.jsdelivr.net/gh/torappinfo/uweb/zh/searchurl/bml/content/rmo.js">移除覆盖物</a></p>
<a target="_self" href="i:0hbookmarklet/google翻译.js:https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit:%0A{let d=document,b=d.body,v=d.createElement('div');v.id='google_translate_element';v.style='position:fixed;bottom:10px;right:10px;cursor:pointer;z-index:9999';b.insertBefore(v,b.firstChild);function googleTranslateElementInit(){new google.translate.TranslateElement({layout:google.translate.TranslateElement.InlineLayout.SIMPLE,multilanguagePage:true,pageLanguage:'auto',includedLanguages:'zh-CN,zh-TW,en,ko,ja'},'google_translate_element');}}">google翻译</a></p>
<p><a target="_self" href='i:0hbookmarklet/eruda.js:https://fastly.jsdelivr.net/npm/eruda:%0Aeruda.init()'>Eruda</a></p>
<p><a target="_self" href="i:0hbookmarklet/performance.js:https://fastly.jsdelivr.net/gh/micmro/performance-bookmarklet/dist/performanceBookmarklet.min.js">Performance</a><br>
<a target="_self" href="i:0hbookmarklet/移除覆盖物.js:../searchurl/bml/content/rmo.js">移除覆盖物</a></p>
<p><b>远程脚本</b>配置文件default.rjs样列如下点击以下链接自动安装 (清空后台重启浏览器,长按搜索按钮,则弹出远程脚本菜单)</p>
<p><a href="i:04彩云小译:['https://caiyunapp.com/dest/trs.js']">彩云小译:['https://caiyunapp.com/dest/trs.js']</a></p>
<p><a href="i:04Selection to sentence:;let g='sentence';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);">Selection to sentence:;let g='sentence';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);</a></p>
<p><a href="i:04Selection to line:;let g='line';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);">Selection to line:;let g='line';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);</a></p>
<p><a href="i:04Selection to paragraph:;let g='paragraph';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);">Selection to paragraph:;let g='paragraph';getSelection().modify('move','forward',g);getSelection().modify('extend','backward',g);</a></p>
@ -68,7 +66,7 @@
<p><a href="i:04站内搜索:;open('i:15site:' + location.hostname)">站内搜索:;open('i:15site:' + location.hostname)</a></p>
<p><a href="i:04编辑器拼写检查:;let t=document.getElementsByTagName('textarea');let v=t[0].spellcheck;if(v==null)v=false;t[0].spellcheck=!v">编辑器拼写检查:;let t=document.getElementsByTagName('textarea');let v=t[0].spellcheck;if(v==null)v=false;t[0].spellcheck=!v</a></p>
<p>远程及小型脚本可安装到default.rjs文件中。远程脚本对CSP网站仍然有效。<br>
<a target="_self" href="i:0gdefault.rjs:https://fastly.jsdelivr.net/gh/torappinfo/uweb/searchurl/txt/rjs.cfg">点击安装google翻译、背景图等</a></p>
<a target="_self" href="i:0gdefault.rjs:../searchurl/txt/rjs.cfg">点击安装google翻译、背景图等</a></p>
<p>远程脚本配置文件default.rjs每行格式如下 (url部分支持js代码运算)<br>
[远程脚本名]:[返回url数组的javascript代码]</p>
<p>其中url可以为本地http脚本地址。譬如'https://local/...' (<a href="../html5/index.html">本地html5应用</a><a href="../offlinecache/index.html">离线缓存</a>)。此时js脚本也可使用<a href="../links/index.html">.link文件</a>方式调用。</p>

View File

@ -0,0 +1,121 @@
{
const svgns = "http://www.w3.org/2000/svg";
const textAttributes = new Set([
'color',
'dominant-baseline',
'font-family',
'font-size',
'font-size-adjust',
'font-stretch',
'font-style',
'font-variant',
'font-weight',
'direction',
'letter-spacing',
'text-decoration',
'text-anchor',
'text-decoration',
'text-rendering',
'unicode-bidi',
'word-spacing',
'writing-mode',
'user-select',
]);
function copyTextStyles(styles, svgElement){
for (const textProperty of textAttributes) {
const value = styles.getPropertyValue(textProperty)
if (value) {
svgElement.setAttribute(textProperty, value)
}
}
// tspan uses fill, CSS uses color
svgElement.setAttribute('fill', styles.color)
}
function handleSVGElement(svg, element){
const contentContainer = Document.createElementNS(svgns, 'g');
contentContainer.innerHTML = element.innerHTML;
contentContainer.dataset.viewBox = element.getAttribute('viewBox');
contentContainer.dataset.width = element.getAttribute('width');
contentContainer.dataset.height = element.getAttribute('height');
let viewBoxTransformMatrix = element.getScreenCTM();
contentContainer.transform.baseVal.appendItem( contentContainer.transform.baseVal.createSVGTransformFromMatrix(viewBoxTransformMatrix));
svg.appendChild(contentContainer);
}
function createSVG(svg, node){
let rect;
if(Node.TEXT_NODE === node.nodeType) {
let str = node.textContent;
if(str.match(/^\s+$/)) return;
rect = node.parentElement.getBoundingClientRect();
const text = document.createElementNS(svgns, 'text');
text.innerHTML = str;
text.setAttribute("x", rect.left);
text.setAttribute("y", rect.top);
svg.appendChild(text);
return;
}
if(Node.ELEMENT_NODE!=node.nodeType) return;
let element = node;
if("SCRIPT" == element.tagName ||
"STYLE" == element.tagName) return;
rect = element.getBoundingClientRect();
if("SVG" == element.tagName) {
handleSVGElement(svg,element);
/*
let clone = element.cloneNode(true);
clone.setAttribute("x", rect.left);
clone.setAttribute("y", rect.top);
clone.setAttribute("width", rect.width);
clone.setAttribute("height", rect.height);
svg.appendChild(clone);
*/
return;
}
//const styles = window.getComputedStyle(element);
let children = element.childNodes;
let nChildren = children.length;
// Get the HTML element's style
//var style = window.getComputedStyle(element);
//svg.setAttribute("style", style);
// Iterate through the HTML element's children
for (let i = 0; i < nChildren; i++) {
createSVG(svg, children[i]);
}
}
// Get the HTML element to be converted
let element = document.body;
// Append the SVG element to the HTML document
let svg = document.createElementNS(svgns,'svg');
let rect = element.getBoundingClientRect();
// svg.setAttribute("x", rect.left);
// svg.setAttribute("y", rect.top);
svg.setAttribute("width", rect.width);
svg.setAttribute("height", rect.height);
createSVG(svg, element);
//document.body.appendChild(svg);
// Create a Blob of the string
let svgS = new XMLSerializer().serializeToString(svg);
const blob = new Blob([svgS], { type: 'text/plain' });
// Create a link element
const link = document.createElement('a');
// Create the url
link.href = window.URL.createObjectURL(blob);
// Set the file name
link.download = 'uweb.svg';
// Append the link to the DOM
document.body.appendChild(link);
// Click the link
link.click();
// Remove the link from the DOM
document.body.removeChild(link);
}

View File

@ -61,7 +61,7 @@ set PATH=/system/bin:/data/data/info.torapp.uweb/files/bin<br>
tcron /sdcard/a &quot;cloud189-go sign;toybox touch /sdcard/a&quot; 24<br>
#每30天清空baidu目录<br>
tcron /sdcard/b &quot;rm -rf /sdcard/baidu/*;toybox touch /sdcard/b&quot; 720</p>
<p><a target="_self" href="i:0hdefault.rc:https://fastly.jsdelivr.net/gh/torappinfo/uweb/zh/searchurl/txt/default.rc">安装default.rc模板文件termux</a></p>
<p><a target="_self" href="i:0hdefault.rc:../searchurl/txt/default.rc">安装default.rc模板文件termux</a></p>
<p>可能用到的命令:<br>
termux中安装remind可配置各类提醒功能十分强大。<br>
apt install remind</p>

View File

@ -194,16 +194,14 @@ tgz install::toybox tar -xzf %f -C /
<description>特定网址用户脚本
全局脚本位于js子目录, 长按[☰]按钮配置。点击以下链
接安装:
&amp;lt;a target=_self&amp;quot; href=&amp;quot;i:0hjs/记住密码.js:https://fastly.jsdelivr.net/gh/torappinfo/uweb/searchurl/txt/passwdsave.js&amp;quot;&amp;gt;记住密码
&amp;lt;a target=_self&amp;quot; href=&amp;quot;i:0hjs/记住密码.js:../searchurl/txt/passwdsave.js&amp;quot;&amp;gt;记住密码
极速网页
大型脚本可安装到&amp;quot;bookmarklet&amp;quot;目录下长按js按钮
google翻译
Eruda
彩云小译
Performance
移除覆盖物
远程脚本配置文件default.rjs样列如下点击以下链接自动安装 (清空后台重启浏览器,长按搜索按钮,则弹出远程脚本菜单)
彩云小译:[&#39;https://caiyunapp.com/dest/trs.js&#39;]
Selection to sentence:;let g=&#39;sentence&#39;;getSelection().modify(&#39;move&#39;,&#39;forward&#39;,g);getSelection().modify(&#39;extend&#39;,&#39;backward&#39;,g);
Selection to line:;let g=&#39;line&#39;;getSelection().modify(&#39;move&#39;,&#39;forward&#39;,g);getSelection().modify(&#39;extend&#39;,&#39;backward&#39;,g);
Selection to paragraph:;let g=&#39;paragraph&#39;;getSelection().modify(&#39;move&#39;,&#39;forward&#39;,g);getSelection().modify(&#39;extend&#39;,&#39;backward&#39;,g);