add CSP & CORS white list support

This commit is contained in:
James Feng Cao 2022-10-26 22:43:36 +08:00
parent 2d016e3fdb
commit 8bb1645e7c
10 changed files with 34 additions and 39 deletions

View file

@ -184,6 +184,7 @@ Save engine:i:54:
Save link:i:55:
Save to desktop:i:58
Add to media storage::001
Extract web app:i:0bsitecache/local/:
tgurl:https://tx.me/share/url?url=
tgdownload:https://tx.me/share/url?url=/download Compatible mode:i:5d
papago:https://papago.naver.net/website?locale=en&target=en&url=
@ -200,8 +201,7 @@ googlecache:http://webcache.googleusercontent.com/search?q=cache:
google by image:https://www.google.com/searchbyimage?image_url=
tinyeye:https://tineye.com/search?url=
Yandex image:https://yandex.com/images/search?text=
Yandex by image:https://yandex.com/images/search?family=yes&rpt=imageview&url=
ascii2d:https://ascii2d.net/search/url/</description>
Yandex by image:https://yandex.</description>
</item>
<item>

View file

@ -218,10 +218,6 @@ TTS</p>
play video fullscreen. if videourl is empty, then make following requestFullscreen() work.</p>
</li>
<li>
<p>i:5g[videourl]<br>
play video in external player</p>
</li>
<li>
<p>i:5h[?postfix:|/regex/replacement:][url]<br>
force html for [url] visiting</p>
<ul>
@ -238,6 +234,10 @@ Use the existing tab for the url with possible different url hash part.</p>
if [string] is file url, then send the file/folder to network, otherwise send [string] to network.</p>
</li>
<li>
<p>i:5p[videourl]<br>
play video in external player</p>
</li>
<li>
<p>i:60[path]:[url]<br>
If existing local file, then open it or visit the [url].</p>
</li>

View file

@ -65,6 +65,10 @@
<p><a href="i:04Spell check:;let t=document.getElementsByTagName('textarea');let v=t[0].spellcheck;if(v==null)v=false;t[0].spellcheck=!v">Spell check:;let t=document.getElementsByTagName('textarea');let v=t[0].spellcheck;if(v==null)v=false;t[0].spellcheck=!v</a></p>
<p>Remote script configuration file &quot;default.rjs&quot; whose lines have the following format:<br>
[script name]:[javascript code to return url arrays]</p>
<h4 id="allow-remote-js-on-csp-content-security-policy-sites">Allow remote js on CSP (Content Security Policy) sites</h4>
<p>All remote js (default.rjs) are allowed to execute on CSP sites. Local js files without remote resource access work fine when under the folder &quot;bookmarklet&quot;, others needs to be refered in default.rjs as http urls such as &quot;https://local/...&quot; (<a href="../html5/index.html">html5</a> or <a href="../offlinecache/index.html">offline cache</a>) .</p>
<h4 id="allow-cors-cross-origin-resource-share">Allow CORS (Cross-Origin Resource Share)</h4>
<p>Put a domain followed by &quot;::&quot; in the file &quot;<a href="../redirect/index.html">default.redirect</a>&quot; to allow CORS with the option &quot;resource redirection&quot;.</p>
</div>

View file

@ -68,6 +68,7 @@ Save engine:i:54:
Save link:i:55:
Save to desktop:i:58
Add to media storage::001
Extract web app:i:0bsitecache/local/:
tgurl:https://tx.me/share/url?url=
tgdownload:https://tx.me/share/url?url=/download Compatible mode:i:5d
papago:https://papago.naver.net/website?locale=en&amp;amp;target=en&amp;amp;url=
@ -84,8 +85,7 @@ googlecache:http://webcache.googleusercontent.com/search?q=cache:
google by image:https://www.google.com/searchbyimage?image_url=
tinyeye:https://tineye.com/search?url=
Yandex image:https://yandex.com/images/search?text=
Yandex by image:https://yandex.com/images/search?family=yes&amp;amp;rpt=imageview&amp;amp;url=
ascii2d:https://ascii2d.net/search/url/</description>
Yandex by image:https://yandex.</description>
</item>
<item>

View file

@ -57,6 +57,7 @@
<p><a href="i:01Save link:i:55:">Save link:i:55:</a></p>
<p><a href="i:01Save to desktop:i:58">Save to desktop:i:58</a></p>
<p><a href="i:01Add to media storage::001">Add to media storage::001</a></p>
<p><a href="i:01Extract web app:i:0bsitecache/local/:">Extract web app:i:0bsitecache/local/:</a></p>
<p><a href="i:01tgurl:https://tx.me/share/url?url=">tgurl:https://tx.me/share/url?url=</a></p>
<p><a href="i:01tgdownload:https://tx.me/share/url?url=/download ">tgdownload:https://tx.me/share/url?url=/download </a></p>
<p><a href="i:01Compatible mode:i:5d">Compatible mode:i:5d</a></p>
@ -88,7 +89,7 @@
<p>in which &quot;redirect&quot; needs <a href="../redirect/index.html">default.redirect</a>.</p>
<p>The following is mostly useful to send msg to TV (TV side needs to execute &quot;wait for msg&quot; first):</p>
<p><a href="i:01Send url/file:i:5j">Send url/file:i:5j</a></p>
<p><a href="i:01Send url(player):i:5ji:5g">Send url(player):i:5ji:5g</a></p>
<p><a href="i:01Send url(player):i:5ji:5p">Send url(player):i:5ji:5p</a></p>
<p><a href="i:01Send url(bookmark):i:5ji:52../home5:">Send url(bookmark):i:5ji:52../home5:</a></p>
<p><a href="i:01Send url(clipboard):i:5ji:5b">Send url(clipboard):i:5ji:5b</a></p>
<p><a href="i:01Send url(fullscreen):i:5ji:5f">Send url(fullscreen):i:5ji:5f</a></p>
@ -98,7 +99,7 @@
<p><a href="i:01Send url(bookmark site fullscreen):i:5ji:52../home5:i:0mi:5f:">Send url(bookmark site fullscreen):i:5ji:52../home5:i:0mi:5f:</a></p>
<p>The following needs corresponding <a href="../html5/index.html">html5 application</a> to be installed:</p>
<p><a href="i:01txtview:file:///data/user/0/info.torapp.uweb/files/app/txtview.html?url=">txtview:file:///data/user/0/info.torapp.uweb/files/app/txtview.html?url=</a></p>
<p><a href="i:01mdkatex:file:///data/user/0/info.torapp.uweb/files/app/mdkatex.html?url=">mdkatex:file:///data/user/0/info.torapp.uweb/files/app/mdkatex.html?url=</a></p>
<p><a href="i:01md+katex:file:///data/user/0/info.torapp.uweb/files/app/mdkatex.html?url=">md+katex:file:///data/user/0/info.torapp.uweb/files/app/mdkatex.html?url=</a></p>
<p><a href="i:01markdeep:file:///data/user/0/info.torapp.uweb/files/app/markdeep.html?url=">markdeep:file:///data/user/0/info.torapp.uweb/files/app/markdeep.html?url=</a></p>
<p><a href="i:01plyr:file:///data/user/0/info.torapp.uweb/files/app/plyr.html?u=">plyr:file:///data/user/0/info.torapp.uweb/files/app/plyr.html?u=</a></p>
<p><a href="i:01dplayer:file:///data/user/0/info.torapp.uweb/files/app/dplayer.html?u=">dplayer:file:///data/user/0/info.torapp.uweb/files/app/dplayer.html?u=</a></p>