From 8bb1645e7c276f2153e39c5c82027753bf1511ea Mon Sep 17 00:00:00 2001
From: James Feng Cao
Date: Wed, 26 Oct 2022 22:43:36 +0800
Subject: [PATCH] add CSP & CORS white list support
---
en/index.xml | 4 ++--
en/links/index.html | 8 ++++----
en/rjs/index.html | 4 ++++
en/topposts/index.xml | 4 ++--
en/urls/index.html | 5 +++--
index.html | 11 +----------
zh/index.xml | 6 +++---
zh/links/index.html | 8 ++++----
zh/topposts/index.xml | 6 +++---
zh/urls/index.html | 17 ++++++++---------
10 files changed, 34 insertions(+), 39 deletions(-)
diff --git a/en/index.xml b/en/index.xml
index 588d9575..ac2d69ae 100644
--- a/en/index.xml
+++ b/en/index.xml
@@ -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/
+Yandex by image:https://yandex.
diff --git a/en/links/index.html b/en/links/index.html
index 7d53e5cb..92550186 100644
--- a/en/links/index.html
+++ b/en/links/index.html
@@ -218,10 +218,6 @@ TTS
play video fullscreen. if videourl is empty, then make following requestFullscreen() work.
-
i:5g[videourl]
-play video in external player
-
-
i:5h[?postfix:|/regex/replacement:][url]
force html for [url] visiting
@@ -238,6 +234,10 @@ Use the existing tab for the url with possible different url hash part.
if [string] is file url, then send the file/folder to network, otherwise send [string] to network.
+
i:5p[videourl]
+play video in external player
+
+
i:60[path]:[url]
If existing local file, then open it or visit the [url].
Remote script configuration file "default.rjs" whose lines have the following format:
[script name]:[javascript code to return url arrays]
+
Allow remote js on CSP (Content Security Policy) sites
+
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 "bookmarklet", others needs to be refered in default.rjs as http urls such as "https://local/..." (html5 or offline cache) .
+
Allow CORS (Cross-Origin Resource Share)
+
Put a domain followed by "::" in the file "default.redirect" to allow CORS with the option "resource redirection".
diff --git a/en/topposts/index.xml b/en/topposts/index.xml
index e7d15a55..c5916906 100644
--- a/en/topposts/index.xml
+++ b/en/topposts/index.xml
@@ -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&target=en&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&rpt=imageview&url=
-ascii2d:https://ascii2d.net/search/url/
+Yandex by image:https://yandex.
diff --git a/en/urls/index.html b/en/urls/index.html
index f89881be..abad4ae2 100644
--- a/en/urls/index.html
+++ b/en/urls/index.html
@@ -57,6 +57,7 @@