Compare commits

...

181 Commits

Author SHA1 Message Date
Simon Brazell cd35a73b4d
Merge pull request #317 from xyzshantaram/master
Clarify README
2021-12-06 23:15:41 +11:00
Simon Brazell a0535ed12a
Merge pull request #316 from alyssais/wikipedia
Fix typo in "Toggle Wikipedia redirects" aria label
2021-12-06 23:14:00 +11:00
Simon Brazell dc57781e55
Merge pull request #314 from xanoni/remove-onion-v2
Remove Onion v2 links ...
2021-12-06 23:13:15 +11:00
Simon Brazell 6503cb3b0c
Merge pull request #323 from opalvault/add-old-reddit
Removes old.reddit.com/i.reddit.com/dead links. Adds old.reddit.com to redirection targets.
2021-12-06 22:32:47 +11:00
Simon Brazell 8d24d0fe6d
Merge pull request #278 from MonsieurBibo/patch-1
Fixed french typo in store.md
2021-12-06 21:44:22 +11:00
ry 449c6e5290 Added old.reddit.com to targets, removed old.reddit.com/i.reddit.com
from redirects.
2021-10-30 13:24:13 -07:00
Siddharth Singh 9faa9c7a5a
Clarify README
This was recently posted on Hacker News, and someone wrote that it wasn't clear enough that you'd be accessing the same content. Hopefully this commit fixes that.
2021-10-20 17:05:48 +05:30
Alyssa Ross ef09d87fb0
Fix typo in "Toggle Wikipedia redirects" aria label 2021-10-19 10:16:46 +00:00
xanoni 02d90bda57
Remove Onion v2 links ...
... because everything comes to an end
2021-10-16 05:03:28 -04:00
MonsieurBibo 97d186e272
Fixed french typo in store.md 2021-08-15 17:26:27 +02:00
Simon Brazell 4c1290acb2
Merge pull request #272 from Elaborendum/patch-1
Update Spanish Translation
2021-07-27 13:56:16 +10:00
Elaborendum 11819843f4
Update messages.json 2021-07-26 17:53:03 -05:00
SimonBrazell b31c5bf75a Disable Wikiless redirects by default, add "New" tag (#232). 2021-07-25 14:56:28 +10:00
Simon Brazell 6b26f27f9a
Merge pull request #263 from git-bruh/master
add libreddit instance
2021-07-25 14:34:30 +10:00
Simon Brazell 20aafaaa17
Merge pull request #257 from Kotuklion/master
Add Wikiless support
2021-07-25 14:33:02 +10:00
git-bruh fe98d5a798
add libreddit instance 2021-07-17 12:45:14 +05:30
Simon Brazell a2405b44b4
Merge pull request #259 from unixfox/invidious.fdn.fr
removing invidious.fdn.fr
2021-07-16 23:10:23 +10:00
Simon Brazell a42fe58b1d
Merge pull request #256 from unbranched/patch-3
Italian translation fix
2021-07-16 23:09:45 +10:00
Simon Brazell 049f71fd71
Merge pull request #254 from timharek/master
Add redirect for Norwegian Google Translate
2021-07-16 23:08:03 +10:00
Emilien Devos ee6a96ec0a removing invidious.fdn.fr 2021-07-14 00:36:40 +02:00
Kotuklion 033dad74bc cleanup 2021-07-12 23:08:08 +02:00
Kotuklion 9d92671692 better GET processing 2021-07-12 23:02:56 +02:00
Kotuklion 010d19aff9 check host instead of the whole href for occurence of wikipedia.org 2021-07-12 18:48:52 +02:00
Kotuklion 058ca7b6e0 left some unnecessary spaces here and there 2021-07-12 18:30:54 +02:00
Kotuklion cf7575f33b fix minor typos 2021-07-12 18:24:45 +02:00
Kotuklion 60be141050 add Wikiless support 2021-07-12 18:16:23 +02:00
unbranched 1ef8f02372
Italian translation fix
Title fix
2021-07-11 08:39:59 +00:00
Tim Hårek Andreassen 2f903e056b
Add redirect for Norwegian Google Translate
Signed-off-by: Tim Hårek Andreassen <tim@harek.dev>
2021-07-10 15:34:29 +02:00
SimonBrazell 8a21b62478 Bump version & update dependencies. 2021-07-10 09:47:41 +10:00
SimonBrazell 20a6692e4c Closes #242: remove "new" tag from SimplyTranslate. 2021-07-10 09:44:23 +10:00
Simon Brazell c1b446ced1
Merge pull request #248 from FantasyCookie17/master
Add reddit.artemislena.eu
2021-06-17 22:09:55 +10:00
SimonBrazell 1e1fb22302 Merge branch 'master' of github.com:SimonBrazell/privacy-redirect 2021-06-16 23:32:24 +10:00
SimonBrazell 0bd8507fb8 Fixes #238 2021-06-16 23:31:21 +10:00
Simon Brazell c78ee93ae6
Merge pull request #250 from GaurangTandon/fix-license-link
Fixed license link
2021-06-16 22:58:18 +10:00
Simon Brazell 4f9c130396
Merge pull request #246 from B0pol/autoplay
Only append autoplay parameter if necessary
2021-06-16 22:53:44 +10:00
Simon Brazell ebd09086b6
Merge pull request #243 from unbranched/patch-1
Add Italian translation
2021-06-16 22:52:34 +10:00
Simon Brazell 278714033d
Merge pull request #244 from unbranched/patch-2
Add italian translation
2021-06-16 22:52:21 +10:00
Simon Brazell 2c9be901ee
Merge pull request #234 from austinhuang0131/patch-1
Update various instances
2021-06-16 22:38:14 +10:00
Simon Brazell 292c4bc2ff
Merge pull request #226 from unixfox/patch-1
Fix link for the Invidious instances list
2021-06-16 22:32:12 +10:00
Simon Brazell cda8e74567
Merge pull request #225 from jaki/support-redd.it
Redirect redd.it
2021-06-16 22:31:16 +10:00
SimonBrazell 061dfc0904 Redirect Twitter "video" subdomain & update dev dependencies. 2021-06-16 22:22:53 +10:00
Gaurang Tandon 1cbaa3b4a5
Fixed license link 2021-06-16 17:40:46 +05:30
FantasyCookie17 b8a6ec89c9
Added reddit.artemislena.eu 2021-06-16 01:19:47 +02:00
bopol 8e88786dc2 Only append autoplay parameter if necessary 2021-06-12 19:07:37 +02:00
unbranched 6875ad6dbb
Italian translation 2021-06-06 10:05:16 +00:00
unbranched 7d9ad32ac6
Italian translation 2021-06-06 09:54:49 +00:00
Austin Huang 8a8fe35b6b
update nitter instances (2) 2021-05-11 10:27:07 -04:00
Austin Huang a9e6411ca2
update nitter instances (1) 2021-05-11 10:26:02 -04:00
Austin Huang cfd7c15306
update bibliogram instances
closes #233
2021-05-11 10:23:31 -04:00
Émilien Devos d1f27107a1
Fix link for the Invidious instances list 2021-04-25 14:45:43 +00:00
Simon Brazell 888fb0fad0
Merge pull request #224 from fattalion/add-simplytranslate-to-readme
Add SimplyTranslate to README
2021-04-24 15:57:59 +10:00
Jason Kim 8e11c48850
fix: add comments prefix for /foo/
Links that end in trailing slash but don't have "/comments/" should add
"/comments" prefix but don't because the regex match succeeds.  Fix the
regular expression to be more robust and add prefix for paths like

- /foo/
- /////foo
- /foo/////
- ////foo////

and not add prefix for paths like

- /comments/foo
- /////comments/foo
- /comments/////foo
- ////comments////foo
- ////comments////foo/////
2021-04-22 23:32:31 -07:00
Jason Kim e3df6c4333
fix: add comments prefix if no nested path
The previous fix failed to consider links like
"redd.it/r/.../comments/...".  Those don't really exist in the wild, and
they don't work (when redirects are turned off).  Still, play it safe
and don't add "/comments" prefix unless the path has height 1.

Now, redirects should work for

- redd.it/foo
- redd.it/comments/foo
- redd.it/r/bar/comments/foo

even though the only kind of native link that works is

- redd.it/foo
2021-04-22 23:01:54 -07:00
Jason Kim 21ee6b8542 fix: add "/comments" prefix only if it's missing
Although I have never seen it in the wild, it is possible to navigate to
"redd.it/comments/...".  This should redirect to
"teddit.net/comments/..." in the case of instance teddit.net.  However,
the current code redirects it to "teddit.net/comments/comments/...".
Fix it by avoiding adding the prefix if it's already there.
2021-04-22 23:00:09 -07:00
Jason Kim bb6894cec5 feat: support teddit by adding /comments hint
Redirecting tedd.it links to teddit instances works when the link starts
with "/comments".  Add "/comments" to the path for teddit.
2021-04-22 23:00:08 -07:00
Jason Kim 24bf815516
note: explain why redirect is needed for redd.it
If you try visiting a redd.it site like <https://redd.it/1fwqjw> (first
link that came up when searching "site:redd.it"), you may think that the
redirect works because it goes to your configured instance.  However,
there's a leak: redd.it is a redirect to a www.reddit.com site, and
that's when the redirect to instance happens.  If you observe the
network traffic, you'll see that a GET request goes to redd.it, and
redd.it returns HTTP code 302 and location https://www.reddit.com/...

Let's not do that.  Redirect at redd.it so that requests don't hit
reddit servers.  This does not seem to work for teddit instances, so
don't redirect for them.
2021-04-22 21:12:35 -07:00
Jason Kim 9fc3fccf65 fix: don't redirect redd.it for teddit
redd.it redirects don't work for teddit, so don't do it.
2021-04-22 21:12:16 -07:00
Jason Kim 68a89b1c0c feat: add redd.it to reddit targets
Although it doesn't work for teddit, add redd.it to the list of URLs to
redirect.
2021-04-22 21:00:52 -07:00
fattalion 4ad9fd5971 Add SimplyTranslate to README 2021-04-20 15:17:32 +03:00
Simon Brazell 800aa2b6a5
Merge pull request #222 from TotalCaesar659/patch-1
Update Russian translation
2021-04-18 00:11:50 +10:00
TotalCaesar659 2a247f4772
Update Russian translation 2021-04-16 16:31:25 +03:00
SimonBrazell 32dc9b1601 Update translations 2021-04-16 14:16:40 +10:00
SimonBrazell 972ad1299e Fixes #146 - OSM redirect breaks Google Earth 2021-04-16 13:10:19 +10:00
SimonBrazell f714c666d9 Fixes #135 - Handle Twitter usernames with "tweets" in them. 2021-04-16 13:02:18 +10:00
SimonBrazell 01e986fce3 Fixes #173 - Instance list clicking issue. 2021-04-16 12:27:39 +10:00
SimonBrazell 7640e5c6bc Prepare for release 1.1.47 2021-04-16 10:45:15 +10:00
Simon Brazell a45e7def92
Merge pull request #219 from jaki/handle-reddit-img
Redirect reddit images for libreddit instances
2021-04-16 09:34:39 +10:00
Simon Brazell 74f5642cc5
Merge pull request #216 from alefvanoon/master
add some instance
2021-04-16 09:33:14 +10:00
Simon Brazell 46593ef565
Merge branch 'master' into master 2021-04-16 09:33:04 +10:00
Simon Brazell 0ba8546292
Merge pull request #214 from cloudrac3r/patch-1
Update Bibliogram instances list
2021-04-16 09:31:27 +10:00
Simon Brazell 0135202682
Merge pull request #206 from Camille019/master
Add Ecosia search engine
2021-04-16 09:26:51 +10:00
Simon Brazell e9f47ab03f
Merge pull request #202 from hbarsaiyan/master
Add Whoogle Search
2021-04-16 09:26:37 +10:00
Simon Brazell 9c34dc5c5b
Merge branch 'master' into master 2021-04-16 09:25:29 +10:00
Simon Brazell 13884fa6c3
Merge pull request #198 from fattalion/add-simply-translate-support
Add SimplyTranslate support
2021-04-16 09:24:06 +10:00
Simon Brazell 6d4d070523
Merge pull request #193 from tenpura-shrimp/master
add invidious instance
2021-04-16 09:23:39 +10:00
Simon Brazell 35f2b4bb70
Merge pull request #188 from Elaborendum/master
Add spanish translation
2021-04-16 09:23:24 +10:00
Simon Brazell 036a2bea1b
Merge pull request #182 from obeho/patch-1
Update reddit.js
2021-04-16 09:23:12 +10:00
alefvanoon 5bdd9cd914 remove nitter.weaponizedhumiliation.com 2021-04-10 15:16:19 +04:30
alefvanoon 4565c23f19 add bird.trom.tf 2021-04-10 15:05:01 +04:30
alefvanoon aeb94f5835 add insta.trom.tf 2021-04-10 15:03:23 +04:30
alefvanoon cc21902cb0 add search.trom.tf 2021-04-10 14:56:35 +04:30
alefvanoon a2dcb2de56 add searx.silkky.cloud 2021-04-09 23:55:14 +04:30
alefvanoon 12fa39e8b0 add libreddit.silkky.cloud 2021-04-09 23:50:37 +04:30
alefvanoon f76ef21294 add some invidious ins 2021-04-09 23:43:29 +04:30
alefvanoon 0c2a0ed64f add some invidious ins 2021-04-09 23:34:57 +04:30
Jason Kim 905abce8f7
refactor: drop teddit image redirect support
No longer redirect image links for teddit instances.  Add a comment
detailing the two issues I found.  Now, the feature should be stable.
2021-04-09 00:16:05 -07:00
Jason Kim e86895b008 fix: don't redirect for rest of instances
Unbreak old.reddit.com and i.reddit.com by ignoring image redirects for
them.
2021-04-09 00:00:42 -07:00
Jason Kim 123cca4e5c fix: redirect teddit differently
Teddit image urls are different from libreddit.  Handle each separately.
Test manually:

- libredd.it: pass
- libreddit.spike.codes: pass
- libreddit.kavin.rocks: pass
- libreddit.insanity.wtf: fail (site doesn't work in general)
- libreddit.dothq.co: pass
- teddit.net: mostly fail
- teddit.ggc-project.de: mostly fail
- teddit.kavin.rocks: mostly fail
- old.reddit.com: fail
- i.reddit.com: fail
- snew.notabug.io: fail (site doesn't work in general)

Teddit image urls have two issues.  First, the links almost never work
(404) if the image url is visited directly before visiting the main
page.  Once the main page is visited, however, the image url starts
working.  I'm guessing this is an issue with teddit instances not
fetching images unless the main page is accessed.  Second, some image
links are different/incompatible for some reason.  For example,
<https://i.redd.it/htg3owj12ok21.png> turns into
<https://teddit.net/pics/w:null_TpEyuHnjif6578pV0lBuM-kNW1bXqxbvqbOHjhRZVr0.png>.
Libreddit seems to not have this issue.
2021-04-08 23:37:43 -07:00
Jason Kim 397fd8cffb feat: add img prefix for i.redd.it
"i.redd.it/<imgfile>" redirects "libredd.it/<imgfile>".  Make it
redirect to "libredd.it/img/<imgfile>".  Tested only for "libredd.it".
2021-04-08 22:38:52 -07:00
Jason Kim 0799b93000 feat: add i.redd.it to reddit targets
Add "i.redd.it" to list of urls to redirect for Reddit.  Although the
redirect works, the link should be invalid because it still needs an
"img" path prefix.
2021-04-08 22:30:41 -07:00
Cadence Ember 6446da6e4c
Update Bibliogram instances list
Set it to match the list of actually working instances.

https://git.sr.ht/~cadence/bibliogram-docs/tree/master/docs/Instances.md
2021-04-07 22:14:47 +12:00
Harsh Barsaiyan b5920f052a
Update manifest.json 2021-04-05 02:46:50 +05:30
Harsh Barsaiyan 0b9f5062a0 Add ViewTube 2021-03-30 23:48:05 +05:30
Camille019 2d2ef8f1f2 Add Ecosia search engine 2021-03-20 11:13:23 +01:00
Harsh Barsaiyan 280064310d Add Whoogle Search 2021-03-11 09:21:56 +00:00
fattalion 7ab37d80de Disable SimplyTranslate redirects by default 2021-03-02 20:55:37 +03:00
fattalion 2bb90f8f41 Add SimplyTranslate support 2021-02-25 18:24:37 +03:00
Andrew Zhao fd37caecf1 add invidious instance 2021-02-24 12:04:52 -08:00
Elaborendum dfc91d4aaf
Create store.md 2021-02-20 01:09:20 -05:00
Elaborendum 7d21a5a15d
Create messages.json 2021-02-20 01:09:01 -05:00
obeho 1f7e58ede4
Update reddit.js
Added instance libreddit.himiko.cloud
2021-02-14 18:50:17 +05:30
Simon Brazell a76ea4f66e
Merge pull request #176 from mmatous/add-presearch
Add Presearch search engine
2021-02-10 09:47:55 +11:00
Simon Brazell a8b1681648
Merge pull request #170 from howoz/master
add turkish translation
2021-02-10 09:45:55 +11:00
Martin Matous f42ccd8891
Add Presearch search engine 2021-02-01 08:10:01 +01:00
howoz 1d120b2165 tr translation done 2021-01-30 06:42:15 +03:00
howoz ed0ddd7575 start of tr translation 2021-01-30 02:41:20 +03:00
Simon Brazell f446c0922d
Merge pull request #164 from yshalsager/patch-1
invidious: Add invidious.tube to instances
2021-01-19 13:45:37 +11:00
Youssif Shaaban Alsager bf1bc849ba
invidious: Add invidious.tube to instances 2021-01-16 22:38:00 +02:00
Simon Brazell a33542eefc
Merge pull request #161 from TotalCaesar659/patch-1
Update Russian translation
2021-01-13 13:14:35 +11:00
TotalCaesar659 a12ec9dc55
Update Russian translation 2021-01-13 03:40:42 +03:00
SimonBrazell fbc16cbb89 Fixes #160 - Disable search redirects by default (sorry... 🙂) 2021-01-13 10:34:49 +11:00
SimonBrazell bd783485a8 Translate "Random instance (none selected)" (#158) 2021-01-12 20:29:26 +11:00
Simon Brazell 23faeec4b5
Merge pull request #157 from TotalCaesar659/patch-1
Update Russian translation
2021-01-12 19:28:22 +11:00
TotalCaesar659 5efbc6eabc
Update messages.json 2021-01-11 19:00:26 +03:00
TotalCaesar659 43fe0c3aea
Update Russian translation 2021-01-11 18:57:30 +03:00
SimonBrazell 96b3d77ee0 Fix typo 2021-01-11 17:53:37 +11:00
SimonBrazell 223d7cd0ac CLoses #130 changed to GPLv3, added SearX instances (#16), fixed instance selects. 2021-01-11 17:46:00 +11:00
SimonBrazell 7736cfaf7a gecko: strict_min_version: 67.0 due to dynamic imports 2021-01-11 12:58:02 +11:00
SimonBrazell f56fc68188 Fix for https://github.com/mozilla/addons-linter/issues/3541#issue-782801439 2021-01-11 12:39:26 +11:00
SimonBrazell 20a2713a56 Fixed README & build config 2021-01-10 22:15:24 +11:00
SimonBrazell 944f2e6ef0 Restructure code with helper modules, add search engine settings, & advanced settings collapsibles. 2021-01-10 22:04:03 +11:00
Simon Brazell c442c3e74b
Merge pull request #153 from somoso/patch-1
Add support for libredd.it
2021-01-10 12:04:39 +11:00
Simon Brazell 2acbbb30d8
Merge pull request #150 from Frank3K/compress-images
Losslessly compress PNG images
2021-01-10 12:04:14 +11:00
Simon Brazell 680c674d8e
Merge pull request #148 from unixfox/add-nitter-unixfox-eu
add nitter.unixfox.eu as a nitter instance to the list
2021-01-10 12:03:46 +11:00
Simon Brazell 481593d1aa
Merge pull request #127 from TotalCaesar659/patch-1
Update Russian translation
2021-01-10 12:03:18 +11:00
Soheb 8e3602145d
Added more instances of teddit and libreddit 2021-01-05 15:51:28 +00:00
Soheb 89d0640bbb
Add support for libredd.it 2021-01-05 14:01:21 +00:00
Frank3K 2335630b48 Losslessly compress PNG images 2020-12-26 10:44:16 +01:00
Emilien Devos b322bf690e add nitter.unixfox.eu as a nitter instance to the list 2020-12-17 18:58:19 +02:00
Simon Brazell a075c44938
Merge pull request #126 from aapl-yumi/patch-1
Add Search Engine redirects.
2020-12-05 23:16:10 +11:00
Simon Brazell 3d45eb3089
Merge pull request #138 from austinhuang0131/patch-2
Add Teddit and Snew to reddit redirect options
2020-12-03 09:26:06 +11:00
Simon Brazell 1a3ec47160
Merge pull request #133 from unixfox/patch-1
Add "yewtu.be" back to the random instance list
2020-12-03 09:23:16 +11:00
Austin Huang 5522efc2ab
Update background.js 2020-11-29 15:42:38 -05:00
aapl-yumi 9c3ca12b65 Updated background.js 2020-11-22 16:41:43 +09:00
Émilien Devos a5cd781ac4
Add "yewtu.be" back to the random instance list 2020-11-17 13:31:14 +00:00
Yumi Izumi 27736105d5
Update background.js 2020-11-11 09:01:33 +09:00
TotalCaesar659 fe9547cf1a
Update Russian translation 2020-11-09 18:02:35 +03:00
Yumi Izumi f483faad4a
Update README.md 2020-11-09 00:13:17 +09:00
Yumi Izumi deab58f015
Update options.js 2020-11-09 00:03:45 +09:00
Yumi Izumi 7f18b0a4a9
Update options.html 2020-11-09 00:01:41 +09:00
Yumi Izumi 1d4c61f4af
Update popup.js 2020-11-08 23:58:22 +09:00
Yumi Izumi 612d359279
Update popup.html 2020-11-08 23:52:55 +09:00
Yumi Izumi a69798f525
Update background.js 2020-11-08 23:50:55 +09:00
SimonBrazell 4bf5f20ad4 Closes #111 - Adds ability to customise random instance pools 2020-11-08 21:07:03 +11:00
SimonBrazell 056af8aff6 Merge branch 'master' of github.com:SimonBrazell/privacy-redirect 2020-11-08 18:02:49 +11:00
Simon Brazell 4d021ed379
Merge pull request #121 from ToughGuyKunio/patch-1
Update README.md
2020-11-08 15:20:50 +11:00
SimonBrazell 55771fadbb Merge branch 'master' of github.com:SimonBrazell/privacy-redirect 2020-11-08 15:18:09 +11:00
SimonBrazell bdb3be921c Fixes #119 - Change zh-CN to zh_CN. 2020-11-08 15:16:52 +11:00
Kunio 66084b1cef
Update README.md
Some suggestions, added FreeTube, updated invidious links, added permissions.
2020-11-07 15:45:44 +01:00
Simon Brazell 2b73235edd
Merge pull request #120 from TotalCaesar659/patch-1
Update Russian translation
2020-11-06 09:44:00 +11:00
TotalCaesar659 3e6b14fd00
Update Russian translation 2020-11-05 16:54:23 +03:00
Simon Brazell bbd648a2e4
Merge pull request #102 from nitrohorse/add-old-reddit-support
feat(): Add support for redirecting to the old Reddit desktop or mobile design
2020-11-05 08:21:35 +11:00
Simon Brazell d6e0d23c36
Merge pull request #118 from B0pol/patch-1
Update Bibliogram links
2020-11-04 23:13:47 +11:00
SimonBrazell c3a15ff0eb Update store listing templates 2020-11-04 23:11:43 +11:00
bopol dc37273e77
Update Bibliogram links
Bibliogram has moved to source hut (for a while now)
2020-11-04 12:47:44 +01:00
SimonBrazell 40003e71a1 Remove duplicate entry in instagramReservedPaths array 2020-11-04 22:36:52 +11:00
SimonBrazell b3d6918e33 Remove "https://yewtu.be" from random instance list 2020-11-04 22:21:24 +11:00
SimonBrazell c6f14ab139 Ignore embedded videos for FreeTube redirects 2020-11-04 22:15:07 +11:00
SimonBrazell 24b0f9c01f Fixes #99 - Bibliogram, handle /igtv/, /tv/ and /reel/ 2020-11-04 22:06:29 +11:00
SimonBrazell ae4b99a33e Fixes #104 - /remove-twitter-sw.js stopping Twitter redirects 2020-11-04 21:56:54 +11:00
SimonBrazell 748f3d0f3a Closes #113 - Added support for FreeTube 2020-11-04 21:55:42 +11:00
SimonBrazell 5f42431bd8 Clean up invidious random instance list 2020-11-04 21:11:20 +11:00
Simon Brazell 76a1df42ff
Merge pull request #112 from austinhuang0131/patch-1
Update instance list
2020-10-26 14:03:53 +11:00
Simon Brazell 85cf8fc07f
Merge pull request #116 from austinhuang0131/master
Add Chinese translation, handle /shorts/ urls, and fix #105 folder
2020-10-26 14:02:58 +11:00
Austin Huang f905f1fcc7
Rename _locales/store.md to _locales/pl/store.md 2020-10-23 19:46:05 -04:00
Austin Huang 51922fa8c2
Create store.md 2020-10-23 19:45:39 -04:00
Austin Huang 9b0f86ce91
Update background.js 2020-10-23 19:34:53 -04:00
Austin Huang 7f9e80abb2
Create messages.json 2020-10-23 19:26:39 -04:00
Austin Huang c668913842
Merge pull request #2 from SimonBrazell/master
force update
2020-10-23 19:15:38 -04:00
Austin Huang ab287f1235
Update instance list 2020-10-04 18:56:44 -04:00
Simon Brazell ed4ebad376
Merge pull request #106 from MichipX3/patch-1
New locale 'PL' for: 'Messages.json'
2020-09-30 09:34:49 +10:00
Simon Brazell 890dc8b1d9
Merge pull request #105 from MichipX3/patch-2
New locale 'PL' for 'store.md' file
2020-09-30 09:34:35 +10:00
MichipX3 a5f3dde8ce
New locale 'PL' for 'store.md' file 2020-09-22 18:32:40 +02:00
MichipX3 98a152e64a
New locale 'PL' for: 'Messages.json' 2020-09-22 18:16:07 +02:00
Simon Brazell 34e093889d
Merge pull request #103 from mleyen/patch-1
Fix French translation
2020-09-17 09:48:48 +10:00
mleyen 7a44c09e43
Fix French translation
One string had the word "invidious" translated literally, making the string unintelligible.
2020-09-16 13:41:13 +02:00
nitrohorse 27f538e50b
Update comment for clarity 2020-09-05 22:32:23 -07:00
nitrohorse b9cd32cfaa
Update variable for consistency 2020-09-05 22:31:15 -07:00
nitrohorse 2603e7a9ea
Update Reddit-related text for consistency, bugfix
Even when on an old Reddit view, redirect from desktop or mobile
depending on whichever one the redirect is set to.
2020-09-05 22:21:41 -07:00
nitrohorse a8103915af
Bump manifest version 2020-09-05 20:17:29 -07:00
nitrohorse 9100240454
Add support for the old Reddit design
Add support for redirecting Reddit links to the old desktop and
mobile designs.
2020-09-05 19:50:59 -07:00
94 changed files with 8013 additions and 1282 deletions

4
.gitignore vendored
View File

@ -1,2 +1,4 @@
web-ext-artifacts/
.DS_Store
.DS_Store
nod
node_modules

1
.nvmrc Normal file
View File

@ -0,0 +1 @@
lts/fermium

687
LICENSE
View File

@ -1,21 +1,674 @@
MIT License
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (c) 2019 Simon Brazell
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Preamble
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@ -1,24 +1,76 @@
# ![privacy-redirect](assets/images/logo-small.png)
# ![privacy-redirect](src/assets/images/logo-small.png)
[![Awesome Humane Tech](https://raw.githubusercontent.com/humanetech-community/awesome-humane-tech/main/humane-tech-badge.svg?sanitize=true)](https://github.com/humanetech-community/awesome-humane-tech)
[![Donate](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/SimonBrazell/donate) [![Buy me a coffee](assets/images/buy-me-a-coffee.png)](https://www.buymeacoffee.com/SimonBrazell)
## Get
[![Firefox Add-on](assets/images/badge-amo.png)](https://addons.mozilla.org/en-US/firefox/addon/privacy-redirect/) [![Chrome Extension](assets/images/badge-chrome.png)](https://chrome.google.com/webstore/detail/privacy-redirect/pmcmeagblkinmogikoikkdjiligflglb) [![Edge Extension](assets/images/badge-ms.png)](https://microsoftedge.microsoft.com/addons/detail/privacy-redirect/elnabkhcgpajchapppkhiaifkgikgihj)
[![Firefox Add-on](src/assets/images/badge-amo.png)](https://addons.mozilla.org/en-US/firefox/addon/privacy-redirect/)
[![Chrome Extension](src/assets/images/badge-chrome.png)](https://chrome.google.com/webstore/detail/privacy-redirect/pmcmeagblkinmogikoikkdjiligflglb)
[![Edge Extension](src/assets/images/badge-ms.png)](https://microsoftedge.microsoft.com/addons/detail/privacy-redirect/elnabkhcgpajchapppkhiaifkgikgihj)
A web extension that redirects Twitter, YouTube, Instagram & Google Maps requests to privacy friendly alternatives - [Nitter](https://github.com/zedeus/nitter), [Invidious](https://github.com/omarroth/invidious), [Bibliogram](https://github.com/cloudrac3r/bibliogram) & [OpenStreetMap](https://www.openstreetmap.org/).
## Donate
Allows for setting custom [Nitter](https://github.com/zedeus/nitter/wiki/Instances), [Invidious](https://github.com/omarroth/invidious/wiki/Invidious-Instances), [Bibliogram](https://github.com/cloudrac3r/bibliogram/wiki/Instances) & [OpenStreetMap](https://wiki.openstreetmap.org/wiki/Tile_servers) instances and toggling all redirects on & off.
[![Donate](https://liberapay.com/assets/widgets/donate.svg)](https://liberapay.com/SimonBrazell/donate) [![Buy me a coffee](src/assets/images/buy-me-a-coffee.png)](https://www.buymeacoffee.com/SimonBrazell)
## Build
- **FIRO** `aEyKPU7mwWBYRFGoLiUGeQQybyzD8jzsS8`
- **BTC:** `3JZWooswwmmqQKw5iW6AYFfK5gcWTrvueE`
- **ETH:** `0x90049dc59365dF683451319Aa4632aC61193dFA7`
1. `npm install --global web-ext`
2. `web-ext build --overwrite-dest`
3. See `web-ext-artifacts/` for outputs.
<img src="https://img.shields.io/liberapay/receives/SimonBrazell.svg?logo=liberapay">
## About
A web extension that redirects _Twitter, YouTube, Instagram, Google Maps, Reddit, Google Search, & Google Translate_ requests to privacy friendly alternative frontends for those sites - [Nitter](https://github.com/zedeus/nitter), [Invidious](https://github.com/iv-org/invidious), [FreeTube](https://github.com/FreeTubeApp/FreeTube), [Bibliogram](https://sr.ht/~cadence/bibliogram/), [OpenStreetMap](https://www.openstreetmap.org/), [SimplyTranslate](https://git.sr.ht/~metalune/simplytranslate_web) & Private Search Engines like [DuckDuckGo](https://duckduckgo.com) and [Startpage](https://startpage.com).
It's possible to toggle all redirects on and off. The extension will default to using random instances if none are selected. If these instances are not working, you can try and set a custom instance from the list below.
### Custom instances
Privacy Redirect allows setting custom instances, instances can be found here:
- [Nitter instances](https://github.com/zedeus/nitter/wiki/Instances)
- [Invidious instances](https://docs.invidious.io/Invidious-Instances.md)
- [Bibliogram instances](https://git.sr.ht/~cadence/bibliogram-docs/tree/master/docs/Instances.md)
- [SimplyTranslate instances](https://git.sr.ht/~metalune/simplytranslate_web#list-of-instances)
- [OpenStreetMap tile servers](https://wiki.openstreetmap.org/wiki/Tile_servers)
- Reddit alternatives:
- [Libreddit](https://github.com/spikecodes/libreddit#instances)
- [Teddit](https://codeberg.org/teddit/teddit#instances)
- [Snew](https://github.com/snew/snew)
- [Old Reddit](https://old.reddit.com) & [Mobile Reddit](https://i.reddit.com), purported to be more privacy respecting than the new UI.
- Google Search alternatives:
- [SearX](https://searx.github.io/searx/)
- [DuckDuckGo](https://duckduckgo.com)
- [Startpage](https://startpage.com)
- [Ecosia](https://www.ecosia.org)
- [Qwant](https://www.qwant.com)
- [Mojeek](https://www.mojeek.com)
- [Presearch](https://www.presearch.org)
- [Whoogle](https://benbusby.com/projects/whoogle-search/)
## Development
### Install Dependencies
- [Node.js](https://nodejs.org/) >=10.0.0 installed
- `npm install`
### Build
- `npm run build`
- `open web-ext-artifacts/`
## Test
- `npm run test`
## License
Code released under [the MIT license](LICENSE.txt).
[GPLv3](LICENSE).
## Permissions
Please note, access to all website navigation events ( all URLs), not just the target domains, is required to allow embedded video redirects to occur. At this time I know of no other way to achieve iframe redirects, happy to hear some suggestions on this though 🙂
## Privacy Policy

Binary file not shown.

Before

Width:  |  Height:  |  Size: 454 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 875 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 433 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 490 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 976 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

View File

@ -1,19 +0,0 @@
window.browser = window.browser || window.chrome;
function localisePage() {
var data = document.querySelectorAll("[data-localise]");
for (var i in data)
if (data.hasOwnProperty(i)) {
var obj = data[i];
var tag = obj.getAttribute("data-localise").toString();
var msg = tag.replace(/__MSG_(\w+)__/g, function (_match, v1) {
return v1 ? browser.i18n.getMessage(v1) : null;
});
if (msg && msg !== tag) obj.textContent = msg;
}
}
localisePage();

View File

@ -1,91 +0,0 @@
"use strict";
const nitterInstances = [
"https://nitter.net",
"https://nitter.snopyta.org",
"https://nitter.42l.fr",
"https://nitter.nixnet.services",
"https://nitter.13ad.de",
"https://nitter.pussthecat.org",
"https://nitter.mastodont.cat",
"https://nitter",
"https://nitter.tedomum.net",
"https://nitter.cattube.org",
"https://nitter.fdn.fr",
"https://nitter.1d4.us",
"https://nitter.kavin.rocks",
];
let disableNitter;
let nitterInstance;
let redirectBypassFlag;
let exceptions;
window.browser = window.browser || window.chrome;
function getRandomInstance() {
return nitterInstances[~~(nitterInstances.length * Math.random())];
}
function isNotException(url) {
return !exceptions.some((regex) => regex.test(url.href));
}
function shouldRedirect(url) {
return (
!redirectBypassFlag &&
isNotException(url) &&
!disableNitter &&
url.host !== nitterInstance &&
!url.pathname.includes("/home")
);
}
function redirectTwitter(url) {
if (url.host.split(".")[0] === "pbs") {
return `${nitterInstance}/pic/${encodeURIComponent(url.href)}`;
} else if (url.host.split(".")[0] === "video") {
return `${nitterInstance}/gif/${encodeURIComponent(url.href)}`;
} else {
return `${nitterInstance}${url.pathname}${url.search}`;
}
}
browser.storage.sync.get(
[
"nitterInstance",
"disableNitter",
"removeTwitterSW",
"redirectBypassFlag",
"exceptions",
],
(result) => {
redirectBypassFlag = result.redirectBypassFlag;
browser.storage.sync.set({
redirectBypassFlag: false,
});
if (!result.removeTwitterSW) {
disableNitter = result.disableNitter;
nitterInstance = result.nitterInstance || getRandomInstance();
exceptions = result.exceptions
? result.exceptions.map((e) => {
return new RegExp(e);
})
: [];
navigator.serviceWorker.getRegistrations().then((registrations) => {
for (let registration of registrations) {
if (registration.scope === "https://twitter.com/") {
registration.unregister();
console.log("Unregistered Twitter SW", registration);
}
}
});
const url = new URL(window.location);
if (shouldRedirect()) {
const redirect = redirectTwitter(url);
console.info("Redirecting", `"${url.href}"`, "=>", `"${redirect}"`);
window.location = redirect;
}
}
}
);

View File

@ -1,542 +0,0 @@
"use strict";
const youtubeDomains = [
"m.youtube.com",
"youtube.com",
"img.youtube.com",
"www.youtube.com",
"youtube-nocookie.com",
"www.youtube-nocookie.com",
"youtu.be",
"s.ytimg.com",
"music.youtube.com",
];
const invidiousInstances = [
"https://invidious.snopyta.org",
"https://yewtu.be",
"https://invidious.13ad.de",
"https://invidious.xyz",
"https://invidious.site",
"https://invidiou.site",
"https://invidious.fdn.fr",
"https://invidious.toot.koeln",
];
const twitterDomains = [
"twitter.com",
"www.twitter.com",
"mobile.twitter.com",
"pbs.twimg.com",
"video.twimg.com",
];
const nitterInstances = [
"https://nitter.net",
"https://nitter.snopyta.org",
"https://nitter.42l.fr",
"https://nitter.nixnet.services",
"https://nitter.13ad.de",
"https://nitter.pussthecat.org",
"https://nitter.mastodont.cat",
"https://nitter.tedomum.net",
"https://nitter.cattube.org",
"https://nitter.fdn.fr",
"https://nitter.1d4.us",
"https://nitter.kavin.rocks",
];
const instagramDomains = [
"instagram.com",
"www.instagram.com",
"help.instagram.com",
"about.instagram.com",
];
const instagramReservedPaths = [
"about",
"explore",
"support",
"press",
"api",
"privacy",
"safety",
"admin",
"graphql",
"accounts",
"help",
"terms",
"contact",
"blog",
"igtv",
"u",
"p",
"fragment",
"imageproxy",
"videoproxy",
".well-known",
];
const bibliogramBypassPaths = /\/(accounts\/|embeds?.js)/;
const bibliogramInstances = [
"https://bibliogram.art",
"https://bibliogram.snopyta.org",
"https://bibliogram.pussthecat.org",
"https://bibliogram.nixnet.services",
"https://bg.endl.site",
"https://bibliogram.13ad.de ",
"https://bibliogram.stemy.me ",
"https://bibliogram.hamster.dance",
"https://bibliogram.ggc-project.de",
];
const osmDefault = "https://openstreetmap.org";
const googleMapsRegex = /https?:\/\/(((www|maps)\.)?(google\.).*(\/maps)|maps\.(google\.).*)/;
const mapCentreRegex = /@(-?\d[0-9.]*),(-?\d[0-9.]*),(\d{1,2})[.z]/;
const dataLatLngRegex = /(!3d|!4d)(-?[0-9]{1,10}.[0-9]{1,10})/g;
const placeRegex = /\/place\/(.*)\//;
const travelModes = {
driving: "fossgis_osrm_car",
walking: "fossgis_osrm_foot",
bicycling: "fossgis_osrm_bike",
transit: "fossgis_osrm_car", // not implemented on OSM, default to car.
};
const layers = {
none: "S",
transit: "T",
traffic: "S", // not implemented on OSM, default to standard.
bicycling: "C",
};
let disableNitter;
let disableInvidious;
let disableBibliogram;
let disableOsm;
let nitterInstance;
let invidiousInstance;
let bibliogramInstance;
let osmInstance;
let alwaysProxy;
let onlyEmbeddedVideo;
let videoQuality;
let invidiousDarkMode;
let invidiousVolume;
let invidiousPlayerStyle;
let invidiousSubtitles;
let invidiousAutoplay;
let exceptions;
window.browser = window.browser || window.chrome;
browser.storage.sync.get(
[
"nitterInstance",
"invidiousInstance",
"bibliogramInstance",
"osmInstance",
"disableNitter",
"disableInvidious",
"disableBibliogram",
"disableOsm",
"alwaysProxy",
"onlyEmbeddedVideo",
"videoQuality",
"invidiousDarkMode",
"invidiousVolume",
"invidiousPlayerStyle",
"invidiousSubtitles",
"invidiousAutoplay",
"exceptions",
],
(result) => {
disableNitter = result.disableNitter;
disableInvidious = result.disableInvidious;
disableBibliogram = result.disableBibliogram;
disableOsm = result.disableOsm;
nitterInstance = result.nitterInstance;
invidiousInstance = result.invidiousInstance;
bibliogramInstance = result.bibliogramInstance;
osmInstance = result.osmInstance || osmDefault;
alwaysProxy = result.alwaysProxy;
onlyEmbeddedVideo = result.onlyEmbeddedVideo;
videoQuality = result.videoQuality;
invidiousDarkMode = result.invidiousDarkMode;
exceptions = result.exceptions
? result.exceptions.map((e) => {
return new RegExp(e);
})
: [];
invidiousVolume = result.invidiousVolume;
invidiousPlayerStyle = result.invidiousPlayerStyle;
invidiousSubtitles = result.invidiousSubtitles || "";
invidiousAutoplay = result.invidiousAutoplay;
}
);
browser.storage.onChanged.addListener((changes) => {
if ("nitterInstance" in changes) {
nitterInstance = changes.nitterInstance.newValue;
}
if ("invidiousInstance" in changes) {
invidiousInstance = changes.invidiousInstance.newValue;
}
if ("bibliogramInstance" in changes) {
bibliogramInstance = changes.bibliogramInstance.newValue;
}
if ("osmInstance" in changes) {
osmInstance = changes.osmInstance.newValue || osmDefault;
}
if ("disableNitter" in changes) {
disableNitter = changes.disableNitter.newValue;
}
if ("disableInvidious" in changes) {
disableInvidious = changes.disableInvidious.newValue;
}
if ("disableBibliogram" in changes) {
disableBibliogram = changes.disableBibliogram.newValue;
}
if ("disableOsm" in changes) {
disableOsm = changes.disableOsm.newValue;
}
if ("alwaysProxy" in changes) {
alwaysProxy = changes.alwaysProxy.newValue;
}
if ("onlyEmbeddedVideo" in changes) {
onlyEmbeddedVideo = changes.onlyEmbeddedVideo.newValue;
}
if ("videoQuality" in changes) {
videoQuality = changes.videoQuality.newValue;
}
if ("invidiousDarkMode" in changes) {
invidiousDarkMode = changes.invidiousDarkMode.newValue;
}
if ("invidiousVolume" in changes) {
invidiousVolume = changes.invidiousVolume.newValue;
}
if ("invidiousPlayerStyle" in changes) {
invidiousPlayerStyle = changes.invidiousPlayerStyle.newValue;
}
if ("invidiousSubtitles" in changes) {
invidiousSubtitles = changes.invidiousSubtitles.newValue;
}
if ("invidiousAutoplay" in changes) {
invidiousAutoplay = changes.invidiousAutoplay.newValue;
}
if ("exceptions" in changes) {
exceptions = changes.exceptions.newValue.map((e) => {
return new RegExp(e);
});
}
});
function getRandomInstance(instanceList) {
return instanceList[~~(instanceList.length * Math.random())];
}
function addressToLatLng(address, callback) {
const xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = () => {
if (xmlhttp.readyState === XMLHttpRequest.DONE) {
if (xmlhttp.status === 200) {
const json = JSON.parse(xmlhttp.responseText)[0];
if (json) {
callback(
`${json.lat}%2C${json.lon}`,
`${json.boundingbox[2]},${json.boundingbox[1]},${json.boundingbox[3]},${json.boundingbox[0]}`
);
}
} else {
console.info("Error: Status is " + xmlhttp.status);
}
}
};
xmlhttp.open(
"GET",
`https://nominatim.openstreetmap.org/search/${address}?format=json&limit=1`,
false
);
xmlhttp.send();
}
function isException(url, initiator) {
return (
exceptions.some((regex) => regex.test(url.href)) ||
(initiator && exceptions.some((regex) => regex.test(initiator.href)))
);
}
function isFirefox() {
return typeof InstallTrigger !== "undefined";
}
function redirectYouTube(url, initiator, type) {
if (disableInvidious || isException(url, initiator)) {
return null;
}
if (
initiator &&
(initiator.origin === invidiousInstance ||
invidiousInstances.includes(initiator.origin) ||
youtubeDomains.includes(initiator.host))
) {
return null;
}
if (url.pathname.match(/iframe_api/) || url.pathname.match(/www-widgetapi/)) {
// Don't redirect YouTube Player API.
return null;
}
if (url.host.split(".")[0] === "studio") {
// Avoid redirecting `studio.youtube.com`
return null;
}
if (onlyEmbeddedVideo && type !== "sub_frame") {
return null;
}
// Apply settings
if (alwaysProxy) {
url.searchParams.append("local", true);
}
if (videoQuality) {
url.searchParams.append("quality", videoQuality);
}
if (invidiousDarkMode) {
url.searchParams.append("dark_mode", invidiousDarkMode);
}
if (invidiousVolume) {
url.searchParams.append("volume", invidiousVolume);
}
if (invidiousPlayerStyle) {
url.searchParams.append("player_style", invidiousPlayerStyle);
}
if (invidiousSubtitles) {
url.searchParams.append("subtitles", invidiousSubtitles);
}
url.searchParams.append("autoplay", invidiousAutoplay ? 1 : 0);
return `${invidiousInstance || getRandomInstance(invidiousInstances)}${
url.pathname
}${url.search}`;
}
function redirectTwitter(url, initiator) {
if (disableNitter || isException(url, initiator)) {
return null;
}
if (url.pathname.includes("/home")) {
return null;
}
if (
isFirefox() &&
initiator &&
(initiator.origin === nitterInstance ||
nitterInstances.includes(initiator.origin) ||
twitterDomains.includes(initiator.host))
) {
browser.storage.sync.set({
redirectBypassFlag: true,
});
return null;
}
if (url.host.split(".")[0] === "pbs") {
return `${
nitterInstance || getRandomInstance(nitterInstances)
}/pic/${encodeURIComponent(url.href)}`;
} else if (url.host.split(".")[0] === "video") {
return `${
nitterInstance || getRandomInstance(nitterInstances)
}/gif/${encodeURIComponent(url.href)}`;
} else if (url.pathname.includes("tweets")) {
return `${
nitterInstance || getRandomInstance(nitterInstances)
}${url.pathname.replace("/tweets", "")}${url.search}`;
} else {
return `${nitterInstance || getRandomInstance(nitterInstances)}${
url.pathname
}${url.search}`;
}
}
function redirectInstagram(url, initiator, type) {
if (disableBibliogram || isException(url, initiator)) {
return null;
}
// Do not redirect Bibliogram view on Instagram links
if (
initiator &&
(initiator.origin === bibliogramInstance ||
bibliogramInstances.includes(initiator.origin) ||
instagramDomains.includes(initiator.host))
) {
return null;
}
// Do not redirect /accounts, /embeds.js, or anything other than main_frame
if (type !== "main_frame" || url.pathname.match(bibliogramBypassPaths)) {
return null;
}
if (
url.pathname === "/" ||
instagramReservedPaths.includes(url.pathname.split("/")[1])
) {
return `${bibliogramInstance || getRandomInstance(bibliogramInstances)}${
url.pathname
}${url.search}`;
} else {
// Likely a user profile, redirect to '/u/...'
return `${bibliogramInstance || getRandomInstance(bibliogramInstances)}/u${
url.pathname
}${url.search}`;
}
}
function redirectGoogleMaps(url, initiator) {
if (disableOsm || isException(url, initiator)) {
return null;
}
let redirect;
let mapCentre = "";
let params = "";
// Set map centre if present
if (url.pathname.match(mapCentreRegex)) {
const [, lat, lon, zoom] = url.pathname.match(mapCentreRegex);
mapCentre = `#map=${zoom}/${lat}/${lon}`;
} else if (url.search.includes("center=")) {
const [lat, lon] = url.searchParams.get("center").split(",");
mapCentre = `#map=${url.searchParams.get("zoom") || "17"}/${lat}/${lon}`;
// Set default zoom if mapCentre not present
} else {
params = "&zoom=17";
}
// Set map layer
params = `${params}&layers=${
layers[url.searchParams.get("layer")] || layers["none"]
}`;
// Handle Google Maps Embed API
if (url.pathname.includes("/embed")) {
let query = "";
if (url.searchParams.has("q")) {
query = url.searchParams.get("q");
} else if (url.searchParams.has("query")) {
query = url.searchParams.has("query");
} else if (url.searchParams.has("pb")) {
try {
query = url.searchParams.get("pb").split(/!2s(.*?)!/)[1];
} catch (error) {
console.error(error);
// Unable to find map marker in URL.
}
}
let marker, bbox;
addressToLatLng(query, (coords, boundingbox) => {
marker = coords;
bbox = boundingbox;
});
redirect = `${osmInstance}/export/embed.html?bbox=${bbox}&layer=mapnik&marker=${marker}`;
// Handle Google Maps Directions
} else if (url.pathname.includes("/dir")) {
const travelMode =
travelModes[url.searchParams.get("travelmode")] || travelModes["driving"];
let origin;
addressToLatLng(url.searchParams.get("origin"), (coords) => {
origin = coords;
});
let destination;
addressToLatLng(url.searchParams.get("destination"), (coords) => {
destination = coords;
});
redirect = `${osmInstance}/directions?engine=${travelMode}&route=${origin}%3B${destination}${mapCentre}${params}`;
// Get marker from data attribute
} else if (
url.pathname.includes("data=") &&
url.pathname.match(dataLatLngRegex)
) {
const [mlat, mlon] = url.pathname.match(dataLatLngRegex);
redirect = `${osmInstance}/?mlat=${mlat.replace(
"!3d",
""
)}&mlon=${mlon.replace("!4d", "")}${mapCentre}${params}`;
// Get marker from ll param
} else if (url.searchParams.has("ll")) {
const [mlat, mlon] = url.searchParams.get("ll").split(",");
redirect = `${osmInstance}/?mlat=${mlat}&mlon=${mlon}${mapCentre}${params}`;
// Get marker from viewpoint param.
} else if (url.searchParams.has("viewpoint")) {
const [mlat, mlon] = url.searchParams.get("viewpoint").split(",");
redirect = `${osmInstance}/?mlat=${mlat}&mlon=${mlon}${mapCentre}${params}`;
// Use query as search if present.
} else {
let query;
if (url.searchParams.has("q")) {
query = url.searchParams.get("q");
} else if (url.searchParams.has("query")) {
query = url.searchParams.get("query");
} else if (url.pathname.match(placeRegex)) {
query = url.pathname.match(placeRegex)[1];
}
redirect = `${osmInstance}/${query ? "search?query=" + query : ""}${
mapCentre || "#"
}${params}`;
}
return redirect;
}
browser.webRequest.onBeforeRequest.addListener(
(details) => {
const url = new URL(details.url);
let initiator;
if (details.originUrl) {
initiator = new URL(details.originUrl);
} else if (details.initiator) {
initiator = new URL(details.initiator);
}
let redirect;
if (youtubeDomains.includes(url.host)) {
redirect = {
redirectUrl: redirectYouTube(url, initiator, details.type),
};
} else if (twitterDomains.includes(url.host)) {
redirect = {
redirectUrl: redirectTwitter(url, initiator),
};
} else if (instagramDomains.includes(url.host)) {
redirect = {
redirectUrl: redirectInstagram(url, initiator, details.type),
};
} else if (url.href.match(googleMapsRegex)) {
redirect = {
redirectUrl: redirectGoogleMaps(url, initiator),
};
}
if (redirect && redirect.redirectUrl) {
console.info(
"Redirecting",
`"${url.href}"`,
"=>",
`"${redirect.redirectUrl}"`
);
console.info("Details", details);
}
return redirect;
},
{
urls: ["<all_urls>"],
},
["blocking"]
);
browser.runtime.onInstalled.addListener((details) => {
if (details.reason === "update") {
browser.storage.sync.get(
["whitelist", "exceptions", "invidiousInstance"],
(result) => {
if (result.whitelist) {
let whitelist = result.whitelist.map((e) =>
e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&")
);
browser.storage.sync.set({
exceptions: result.exceptions.concat(whitelist),
whitelist: null,
});
}
if (result.invidiousInstance === "https://invidio.us") {
browser.storage.sync.set({
invidiousInstance: null,
});
}
}
);
}
});

3958
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

25
package.json Normal file
View File

@ -0,0 +1,25 @@
{
"name": "privacy-redirect",
"description": "Redirects Twitter, YouTube, Instagram and more to privacy friendly alternatives.",
"engines": {
"node": ">=10.0.0",
"npm": ">=5.6.0"
},
"scripts": {
"build": "web-ext build --overwrite-dest --source-dir ./src/",
"test": "web-ext lint --source-dir ./src/ || true"
},
"repository": {
"type": "git",
"url": "git+https://github.com/SimonBrazell/privacy-redirect.git"
},
"author": "SimonBrazell",
"license": "GPL-3.0-only",
"bugs": {
"url": "https://github.com/SimonBrazell/privacy-redirect/issues"
},
"homepage": "https://github.com/SimonBrazell/privacy-redirect#readme",
"devDependencies": {
"web-ext": "^6.2.0"
}
}

View File

@ -1,448 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title></title>
<link href="../styles.css" rel="stylesheet" />
<title>Privacy Redirect Options</title>
</head>
<body>
<div class="tab">
<button
class="tablinks"
id="general-tab"
data-localise="__MSG_generalTab__"
>
General
</button>
<button
class="tablinks"
id="advanced-tab"
data-localise="__MSG_advancedTab__"
>
Advanced
</button>
<button
class="tablinks"
id="exceptions-tab"
data-localise="__MSG_exceptionsTab__"
>
Exceptions
</button>
</div>
<div id="general" class="tabcontent">
<section class="settings-block">
<table class="option" aria-label="Toggle Nitter redirects">
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_disableNitter__">Nitter Redirects</h1>
</td>
<td>
<input
aria-hidden="true"
id="disable-nitter"
type="checkbox"
checked
/>&nbsp;
<label for="disable-nitter" class="checkbox-label"></label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<table class="option" aria-label="Toggle Invidious redirects">
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_disableInvidious__">
Invidious Redirects
</h1>
</td>
<td>
<input
aria-hidden="true"
id="disable-invidious"
type="checkbox"
checked
/>&nbsp;
<label for="disable-invidious" class="checkbox-label"> </label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<table class="option" aria-label="Toggle Bibliogram redirects">
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_disableBibliogram__">
Bibliogram Redirects
</h1>
</td>
<td>
<input
aria-hidden="true"
id="disable-bibliogram"
type="checkbox"
checked
/>&nbsp;
<label for="disable-bibliogram" class="checkbox-label"> </label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<table class="option" aria-label="Toggle OpenStreetMap redirects">
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_disableOsm__">
OpenStreetMap Redirects
</h1>
</td>
<td>
<input
aria-hidden="true"
id="disable-osm"
type="checkbox"
checked
/>&nbsp;
<label for="disable-osm" class="checkbox-label"> </label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_nitterInstance__">Nitter Instance</h1>
<div class="autocomplete">
<input
id="nitter-instance"
type="url"
name="nitter-instance"
placeholder="Random instance (none selected)"
/>
</div>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_invidiousInstance__">Invidious Instance</h1>
<div class="autocomplete">
<input
id="invidious-instance"
type="url"
placeholder="Random instance (none selected)"
/>
</div>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_bibliogramInstance__">Bibliogram Instance</h1>
<div class="autocomplete">
<input
id="bibliogram-instance"
type="url"
placeholder="Random instance (none selected)"
/>
</div>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_osmInstance__">OpenStreetMap Instance</h1>
<div class="autocomplete">
<input
id="osm-instance"
type="url"
placeholder="https://openstreetmap.org"
/>
</div>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_theme__">Theme</h1>
<select id="theme">
<option value="">System</option>
<option value="light-theme">Light</option>
<option value="dark-theme">Dark</option>
</select>
</section>
</div>
<div id="advanced" class="tabcontent">
<section class="settings-block">
<table
class="option"
aria-label="Always proxy videos through Invidious"
>
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_alwaysProxy__">
Always proxy videos through Invidious
</h1>
</td>
<td>
<input
aria-hidden="true"
id="always-proxy"
type="checkbox"
checked
/>&nbsp;
<label for="always-proxy" class="checkbox-label"> </label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<table
class="option"
aria-label="Only redirect embedded video to Invidious"
>
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_onlyEmbeddedVideo__">
Only redirect embedded video to Invidious
</h1>
</td>
<td>
<input
aria-hidden="true"
id="only-embed"
type="checkbox"
checked
/>&nbsp;
<label for="only-embed" class="checkbox-label"> </label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_videoQuality__">Invidious Video Quality</h1>
<select id="video-quality">
<option value="">Default</option>
<option value="hd720">720p</option>
<option value="medium">480p</option>
<option value="dash">DASH (Dynamic Adaptive Streaming over HTTP)</option>
</option>
</select>
</section>
<section class="settings-block">
<table class="option" aria-label="Invidious dark mode aways on">
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_invidiousDarkMode__">
Invidious dark mode always on
</h1>
</td>
<td>
<input
aria-hidden="true"
id="invidious-dark-mode"
type="checkbox"
checked
/>&nbsp;
<label for="invidious-dark-mode" class="checkbox-label">
</label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_invidiousVolume__">
Invidious Volume
</h1>
<input
id="invidious-volume"
name="invidious-volume"
type="range"
min="0"
max="100"
step="1"
/><span id="volume-value"></span>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_invidiousPlayerStyle__">
Invidious Player Style
</h1>
<select id="invidious-player-style">
<option value="">Invidious</option>
<option value="youtube">YouTube</option>
</select>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_invidiousSubtitles__">
Invidious Subtitles - language codes (comma-separated)
</h1>
<input
id="invidious-subtitles"
name="invidious-subtitles"
type="text"
/>
</section>
<section class="settings-block">
<table
class="option"
aria-label="Invidious automatically play video on load"
>
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_invidiousAutoplay__">
Invidious automatically play video on load
</h1>
</td>
<td>
<input
aria-hidden="true"
id="invidious-autoplay"
type="checkbox"
checked
/>&nbsp;
<label for="invidious-autoplay" class="checkbox-label"> </label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<table class="option" aria-label="Persist Invidious preferences">
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_persistInvidiousPrefs__">
Persist Invidious preferences (as cookie)
</h1>
</td>
<td>
<input
aria-hidden="true"
id="persist-invidious-prefs"
type="checkbox"
checked
/>&nbsp;
<label for="persist-invidious-prefs" class="checkbox-label">
</label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<table
class="option"
aria-label="Proactively remove Twitter service worker"
>
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_removeTwitterSW__">
Proactively remove Twitter service worker
</h1>
</td>
<td>
<input
aria-hidden="true"
id="remove-twitter-sw"
type="checkbox"
checked
/>&nbsp;
<label for="remove-twitter-sw" class="checkbox-label"> </label>
</td>
</tr>
</tbody>
</table>
</section>
</div>
<div id="exceptions" class="tabcontent">
<section class="settings-block">
<p data-localise="__MSG_exceptionsDescriptionP1__">
Enter a URL or Regular Expression to be excluded from redirects.
</p>
<p data-localise="__MSG_exceptionsDescriptionP2__">
All requests for or initiating from a URL that matches your exception
will be excluded from redirects.
</p>
<p data-localise="__MSG_exceptionsDescriptionP3__">
Note - Supports JavaScript regular expressions, excluding the
enclosing forward slashes.
</p>
</section>
<section class="settings-block">
<table class="exceptions option">
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_addException__">Add Exception</h1>
</td>
</tr>
<tr>
<td>
<input
id="new-exceptions-item"
type="text"
placeholder="URL or RegExp"
/>
</td>
<td>
<input type="radio" id="url" name="type" value="URL" checked />
<label class="radio" for="url">URL</label>
<input type="radio" id="regExp" name="type" value="RegExp" />
<label class="radio" for="regExp">RegExp</label>
</td>
<td>
<button id="add-to-exceptions">
<svg
xmlns="http://www.w3.org/2000/svg"
width="512"
height="512"
viewBox="0 0 512 512"
>
<line
x1="256"
y1="112"
x2="256"
y2="400"
style="
fill: none;
stroke: #fff;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 32px;
"
/>
<line
x1="400"
y1="256"
x2="112"
y2="256"
style="
fill: none;
stroke: #fff;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 32px;
"
/>
</svg>
</button>
</td>
</tr>
</tbody>
</table>
</section>
<ul id="exceptions-items"></ul>
</div>
<script src="./options.js"></script>
<script src="../../assets/javascript/localise.js"></script>
</body>
</html>

View File

@ -1,10 +1,13 @@
# Extension Store (AMO & Chrome Web Store) Listing
## Summary:
```
Eine einfache Browser-Erweiterung, die Anfragen an Twitter, YouTube, Instagram & Google Maps zu datenschutzfreundlichen Alternativen weiterleitet.
```
## Description:
```
Leitet Anfragen an Twitter, YouTube, Instagram & Google Maps zu datenschutzfreundlichen Alternativen weiter <a href='https://nitter.net/'>Nitter</a>, <a href='https://invidio.us/'>Invidious</a>, <a href='https://bibliogram.art/'>Bibliogram</a>, & <a href='https://www.openstreetmap.org'>OpenStreetMap</a>.
@ -23,12 +26,6 @@ Der Code dieser Browser-Erweiterung ist verfügbar auf <a href='https://github.c
<b>★ Spenden: 👨🏻‍💻</b>
Wenn Ihnen diese Erweiterung gefällt und Sie finanziell in der Lage sind, erwägen Sie bitte <a href='https://www.buymeacoffee.com/SimonBrazell'> mir auf BuyMeACoffee einen Kaffee zu kaufen</a> ☕️ um Ihre Wertschätzung zu zeigen und die Fortsetzung des Projekts zu unterstützen.
<b>★ Was ist neu in dieser Version (v1.1.36) 🆕</b>
<ul>
<li>Russische Übersetzung hinzugefügt</li>
<li>Invidious-Autoplay-Parameter gefixt</li>
</ul>
<b>★ Berechtigungen: </b>
<ul>
<li>Bitte beachten Sie, dass der Zugriff auf alle Website-Navigationsereignisse ( alle URLs), nicht nur auf die Zieldomains, erforderlich ist, damit eingebettete Video-Weiterleitungen stattfinden können. Zur Zeit kenne ich keine andere Möglichkeit, Iframe-Weiterleitungen zu realisieren, freue mich aber über Vorschläge dazu 🙂</li>

View File

@ -0,0 +1,162 @@
{
"extensionName": {
"message": "Privacy Redirect",
"description": "Name of the extension."
},
"extensionDescription": {
"message": "Redirects Twitter, YouTube, Instagram and more to privacy friendly alternatives.",
"description": "Description of the extension."
},
"nitterInstance": {
"message": "Nitter Instance",
"description": "Label for Nitter instance field option (options)."
},
"invidiousInstance": {
"message": "Invidious Instance",
"description": "Label for Invidious instance field option (options)."
},
"bibliogramInstance": {
"message": "Bibliogram Instance",
"description": "Label for Bibliogram instance field option (options)."
},
"osmInstance": {
"message": "OpenStreetMap Instance",
"description": "Label for OSM instance field option (options)."
},
"redditInstance": {
"message": "Reddit Instance",
"description": "Label for Reddit instance field option (options)."
},
"searchEngineInstance": {
"message": "Search Engine Instance",
"description": "Label for Search Engine instance field option (options)."
},
"simplyTranslateInstance": {
"message": "SimplyTranslate Instance",
"description": "Label for SimplyTranslate instance field option (options)."
},
"wikipediaInstance": {
"message": "Wikipedia Instance",
"description": "Label for Wikipedia instance field option (options)."
},
"disableNitter": {
"message": "Nitter Redirects",
"description": "Label for enable/disable Nitter redirects option (options & pop-up)."
},
"disableInvidious": {
"message": "Invidious Redirects",
"description": "Label for enable/disable Invidious redirects option (options & pop-up)."
},
"disableBibliogram": {
"message": "Bibliogram Redirects",
"description": "Label for enable/disable Bibliogram redirects option (options & pop-up)."
},
"disableOsm": {
"message": "OpenStreetMap Redirects",
"description": "Label for enable/disable OSM redirects option (options & pop-up)."
},
"disableReddit": {
"message": "Reddit Redirects",
"description": "Label for enable/disable Reddit redirects option (options & pop-up)."
},
"disableSearchEngine": {
"message": "Search Engine Redirects",
"description": "Label for enable/disable Search Engine redirects option (options & pop-up)."
},
"disableSimplyTranslate": {
"message": "SimplyTranslate Redirects",
"description": "Label for enable/disable SimplyTranslate redirects option (options & pop-up)."
},
"disableWikipedia": {
"message": "Wikipedia Redirects",
"description": "Label for enable/disable Wikipedia redirects option (options & pop-up)."
},
"alwaysProxy": {
"message": "Always proxy videos through Invidious",
"description": "Label for 'Always proxy videos through Invidious' option (options)."
},
"onlyEmbeddedVideo": {
"message": "Only redirect embedded video to Invidious",
"description": "Label for 'Only redirect embedded video to Invidious' option (options)."
},
"videoQuality": {
"message": "Invidious Video Quality",
"description": "Label for 'Invidious Video Quality' option (options)."
},
"removeTwitterSW": {
"message": "Proactively remove Twitter service worker",
"description": "Label for 'Proactively remove Twitter service worker' option (options)."
},
"invidiousDarkMode": {
"message": "Invidious dark mode always on",
"description": "Label for 'Invidious dark mode always on' option (options)."
},
"persistInvidiousPrefs": {
"message": "Persist Invidious preferences (as cookie)",
"description": "Label for 'Persist Invidious preferences (as cookie)' option (options)."
},
"generalTab": {
"message": "General",
"description": "General tab (options)."
},
"advancedTab": {
"message": "Advanced",
"description": "Advanced tab (options)."
},
"exceptionsTab": {
"message": "Exceptions",
"description": "Exceptions tab (options)."
},
"exceptionsDescriptionP1": {
"message": "Enter a URL or Regular Expression to be excluded from redirects.",
"description": "A description of the 'Exceptions' feature paragraph 1 (options)."
},
"exceptionsDescriptionP2": {
"message": "All requests for or initiating from a URL that matches the exception will be excluded from redirects.",
"description": "A description of the 'Exceptions' feature paragraph 2 (options)."
},
"exceptionsDescriptionP3": {
"message": "Note - Supports JavaScript regular expressions, excluding the enclosing forward slashes.",
"description": "A description of the 'Exceptions' feature paragraph 3 (options)."
},
"addException": {
"message": "Add Exception",
"description": "'Add Exceptions' button (options)."
},
"moreOptions": {
"message": "More Options",
"description": "More Options button (pop-up)."
},
"privacy": {
"message": "Privacy",
"description": "Extension title - Privacy (pop-up)."
},
"redirect": {
"message": "Redirect",
"description": "Extension title - Redirect (pop-up)."
},
"version": {
"message": "Version",
"description": "Version"
},
"useFreeTube": {
"message": "Use FreeTube over Invidious when possible",
"description": "Label for 'Use FreeTube over Invidious when possible' option (options)."
},
"nitterRandomPool": {
"message": "Nitter random instance pool (comma-separated)",
"description": "Label for 'Nitter random instance pool (comma-separated)' option (options)."
},
"invidiousRandomPool": {
"message": "Invidious random instance pool (comma-separated)",
"description": "Label for 'Invidious random instance pool (comma-separated)' option (options)."
},
"bibliogramRandomPool": {
"message": "Bibliogram random instance pool (comma-separated)",
"description": "Label for 'Bibliogram random instance pool (comma-separated)' option (options)."
},
"randomInstancePlaceholder": {
"message": "Random instance (none selected)",
"description": "Input placeholder for provider instance settings that select a random instance from a pool when none is selected"
}
}

View File

@ -1,10 +1,13 @@
# Extension Store (AMO & Chrome Web Store) Listing
## Summary:
```
A simple web extension that redirects Twitter, YouTube, Instagram & Google Maps requests to privacy friendly alternatives.
```
## Description:
```
Redirects Twitter, YouTube, Instagram, & Google Maps requests to privacy friendly alternatives - <a href='https://nitter.net/'>Nitter</a>, <a href='https://invidio.us/'>Invidious</a>, <a href='https://bibliogram.art/'>Bibliogram</a>, & <a href='https://www.openstreetmap.org'>OpenStreetMap</a>.
@ -23,12 +26,6 @@ The code for this web extension is available on <a href='https://github.com/Simo
<b>★ Donate: 👨🏻‍💻</b>
If you like this extension and are financially able please consider <a href='https://www.buymeacoffee.com/SimonBrazell'>buying me a coffee</a> ☕️ to show your appreciation and support the continuation of the project.
<b>★ What's New in This Version (v1.1.36) 🆕</b>
<ul>
<li>Added Russian language translation.</li>
<li>Fix Invidious autoplay parameter.</li>
</ul>
<b>★ Permissions: </b>
<ul>
<li>Please note, access to all website navigation events ( all URLs), not just the target domains, is required to allow embedded video redirects to occur. At this time I know of no other way to achieve iframe redirects, happy to hear some suggestions on this though 🙂</li>

View File

@ -0,0 +1,162 @@
{
"extensionName": {
"message": "Privacy Redirect",
"description": "Nombre de la extensión."
},
"extensionDescription": {
"message": "Redirige las solicitudes de Twitter, Youtube, Instagram, Google Maps, Reddit y la Búsqueda de Google a alternativas que respetan su privacidad.",
"description": "Descripción de la extensión."
},
"nitterInstance": {
"message": "Instancia de Nitter",
"description": "Etiqueta del campo para la instancia de Nitter (opciones)."
},
"invidiousInstance": {
"message": "Instancia de Invidious",
"description": "Etiqueta del campo para la instancia de Invidious (opciones)."
},
"bibliogramInstance": {
"message": "Instancia de Bibliogram",
"description": "Etiqueta del campo para la instancia de Bibliogram (opciones)."
},
"osmInstance": {
"message": "Instancia de OpenStreetMap",
"description": "Etiqueta del campo para la instancia de OSM (opciones)."
},
"redditInstance": {
"message": "Instancia de Reddit",
"description": "Etiqueta del campo para la instancia de Reddit (opciones)."
},
"searchEngineInstance": {
"message": "Instancia de Buscador",
"description": "Etiqueta del campo para la instancia de Buscador (opciones)."
},
"simplyTranslateInstance": {
"message": "Instancia deSimplyTranslate",
"description": "Etiqueta del campo para la instancia de SimplyTranslate (opciones)."
},
"wikipediaInstance": {
"message": "Instancia de Wikipedia",
"description": "Etiqueta del campo para la instancia de Wikipedia (opciones)."
},
"disableNitter": {
"message": "Redirecciones de Nitter",
"description": "Etiqueta para activar/desactivar la opción de redirecciones de Nitter (opciones y pop-up)."
},
"disableInvidious": {
"message": "Redirecciones de Invidious",
"description": "Etiqueta para activar/desactivar la opción de redirecciones de Invidious (opciones y pop-up)."
},
"disableBibliogram": {
"message": "Redirecciones de Bibliogram",
"description": "Etiqueta para activar/desactivar la opción de redirecciones de Bibliogram (opciones y pop-up)."
},
"disableOsm": {
"message": "Redirecciones de OpenStreetMap",
"description": "Etiqueta para activar/desactivar la opción de redirecciones de OSM (opciones y pop-up)."
},
"disableReddit": {
"message": "Redirecciones de Reddit",
"description": "Etiqueta para activar/desactivar la opción de redirecciones de Reddit (opciones y pop-up)."
},
"disableSearchEngine": {
"message": "Redirecciones de Buscador",
"description": "Etiqueta para activar/desactivar la opción de redirecciones de Buscador (opciones y pop-up)."
},
"disableSimplyTranslate": {
"message": "Redirecciones de SimplyTranslate",
"description": "Etiqueta para activar/desactivar la opción de redirecciones de SimplyTranslate (opciones y pop-up)."
},
"disableWikipedia": {
"message": "Redirecciones de Wikipedia",
"description": "Etiqueta para activar/desactivar la opción de redirecciones de Wikipedia (opciones y pop-up)."
},
"alwaysProxy": {
"message": "Siempre usar el proxy de Invidious para videos",
"description": "Etiqueta para la opción de 'Siempre usar el proxy de Invidious para videos' (opciones)."
},
"onlyEmbeddedVideo": {
"message": "Solo redirigir los videos incrustados a Invidious",
"description": "Etiqueta para la opción de 'Solo redirigir los videos incrustados a Invidious' (opciones)."
},
"videoQuality": {
"message": "Calidad de Video de Invidious",
"description": "Etiqueta para la opción de 'Calidad de Video de Invidious' (opciones)."
},
"removeTwitterSW": {
"message": "Eliminar proactivamente el service worker de Twitter",
"description": "Etiqueta para la opción de 'Eliminar proactivamente el service worker de Twitter' (opciones)."
},
"invidiousDarkMode": {
"message": "Modo oscuro de Invidious siempre activo",
"description": "Etiqueta para la opción de 'Modo oscuro de Invidious siempre activo' (opciones)."
},
"persistInvidiousPrefs": {
"message": "Preservar preferencias de Invidious (como cookie)",
"description": "Etiqueta para la opción de 'Preservar preferencias de Invidious (como cookie)' (opciones)."
},
"generalTab": {
"message": "General",
"description": "Pestaña general (opciones)."
},
"advancedTab": {
"message": "Avanzado",
"description": "Pestaña avanzado (opciones)."
},
"exceptionsTab": {
"message": "Excepciones",
"description": "Pestaña de excepciones (opciones)."
},
"exceptionsDescriptionP1": {
"message": "Ingrese la URL o la Expresión Regular a excluir de las redirecciones.",
"description": "Una descripción de la función 'Excepciones' párrafo 1 (opciones)."
},
"exceptionsDescriptionP2": {
"message": "Todas las solicitudes para o provenientes de una URL que coincida con la excepción serán excluidas de las redirecciones.",
"description": "Una descripción de la función 'Excepciones' párrafo 2 (opciones)."
},
"exceptionsDescriptionP3": {
"message": "Nota Soporta expresiones regulares de JavaScript, excluyendo las barras oblicuas de cierre.",
"description": "Una descripción de la función 'Excepciones' párrafo 3 (opciones)."
},
"addException": {
"message": "Agregar Excepción",
"description": "Botón de 'Agregar Excepción' (opciones)."
},
"moreOptions": {
"message": "Más Opciones",
"description": "Botón de 'Más Opciones' (pop-up)."
},
"privacy": {
"message": "Privacy",
"description": "Título de la extensión - Privacy (pop-up)."
},
"redirect": {
"message": "Redirect",
"description": "Título de la extensión - Redirect (pop-up)."
},
"version": {
"message": "Versión",
"description": "Versión"
},
"useFreeTube": {
"message": "Usar FreeTube en vez de Invidious cuando sea posible",
"description": "Etiqueta para la opción de 'Usar FreeTube en vez de Invidious cuando sea posible' (opciones)."
},
"nitterRandomPool": {
"message": "Grupo de instancias aleatorias de Nitter (separadas por coma)",
"description": "Etiqueta para la opción de 'Grupo de instancias aleatorias de Nitter (separadas por coma)' (opciones)."
},
"invidiousRandomPool": {
"message": "Grupo de instancias aleatorias de Invidious (separadas por coma)",
"description": "Etiqueta para la opción de 'Grupo de instancias aleatorias de Invidious (separadas por coma)' (opciones)."
},
"bibliogramRandomPool": {
"message": "Grupo de instancias aleatorias de Bibliogram (separadas por coma)",
"description": "Etiqueta para la opción de 'Grupo de instancias aleatorias de Bibliogram (separadas por coma)' (opciones)."
},
"randomInstancePlaceholder": {
"message": "Instancia aleatoria (ninguna seleccionada)",
"description": "Entrada provisional en la configuración del proveedor de instancia que selecciona una instancia aleatoria del grupo cuando ninguna está seleccionada"
}
}

54
src/_locales/es/store.md Normal file
View File

@ -0,0 +1,54 @@
# Extension Store (AMO & Chrome Web Store) Listing
## Summary:
```
Una extensión web simple que redirige las solicitudes de Twitter, Youtube, Instagram, Google Maps, Reddit y la Búsqueda de Google a alternativas que respetan su privacidad.
```
## Description (AMO):
```
Redirige las solicitudes de Twitter, Youtube, Instagram, Google Maps, Reddit y la Búsqueda de Google a alternativas que respetan su privacidad. - <a href='https://nitter.net/'>Nitter</a>, <a href='https://invidio.us/'>Invidious</a>, <a href='https://bibliogram.art/'>Bibliogram</a>, & <a href='https://www.openstreetmap.org'>OpenStreetMap</a>.
Permite ingresar instancias personalizadas, activar/desactivar todas las redirecciones y más.
<b>★ Más Información: </b>
<ul>
<li><a href='https://github.com/zedeus/nitter#nitter-wip'>Nitter</a></li>
<li><a href='https://github.com/omarroth/invidious#invidious'>Invidious</a></li>
<li><a href='https://github.com/cloudrac3r/bibliogram#bibliogram'>Bibliogram</a></li>
<li><a href='https://wiki.openstreetmap.org/'>OpenStreetMap</a></li>
</ul>
El código de esta extensión web está disponible en <a href='https://github.com/SimonBrazell/privacy-redirect'>Github</a>.
<b>★ Dona: 👨🏻‍💻</b>
Si te gusta esta extensión y tienes los recursos económicos, por favor considera <a href='https://www.buymeacoffee.com/SimonBrazell'>comprarme un café</a> ☕️ para mostrar tu aprecio y apoyo al desarrollo del proyecto.
<b>★ Permisos: </b>
<ul>
<li>Por favor, tenga en cuenta que se requiere acceso a todos los eventos de navegación del sitio web (todas las URL), no solo a los dominios de destino, para permitir redireccionamientos de videos incrustados. En este momento no conozco ninguna otra manera de lograr redirecciones iframe; sin embargo, estaría feliz de escuchar algunas sugerencias al respecto 🙂</li>
</ul>
```
## Description (Chrome & Mircosoft):
```
★ Más Información:
• Nitter - https://github.com/zedeus/nitter
• Invidious - https://github.com/omarroth/invidious
• Bibliogram - https://github.com/cloudrac3r/bibliogram
• OpenStreetMap - https://wiki.openstreetmap.org
El código de esta extensión web está disponible en Github - https://github.com/SimonBrazell/privacy-redirect
★ Dona: 👨🏻‍💻
Si te gusta esta extensión y tienes los recursos económicos, por favor considera comprarme un café ☕️ para mostrar tu aprecio y apoyo al desarrollo del proyecto.
☕️ https://www.buymeacoffee.com/SimonBrazell ☕️
🍻 https://liberapay.com/SimonBrazell/donate 🍻
★ Permisos:
• Por favor, tenga en cuenta que se requiere acceso a todos los eventos de navegación del sitio web (todas las URL), no solo a los dominios de destino, para permitir redireccionamientos de videos incrustados. En este momento no conozco ninguna otra manera de lograr redirecciones iframe; sin embargo, estaría feliz de escuchar algunas sugerencias al respecto 🙂
```

View File

@ -52,16 +52,16 @@
"description": "Libellé pour l'option 'Qualité des vidéos Invidious' (options)."
},
"removeTwitterSW": {
"message": "Supprimer proactivement le service Twitter",
"description": "Libellé pour l'option 'Supprimer proactivement le service Twitter' (options)."
"message": "Supprimer proactivement le service worker de Twitter",
"description": "Libellé pour l'option 'Supprimer proactivement le service worker de Twitter' (options)."
},
"invidiousDarkMode": {
"message": "Mode sombre toujours activé pour Invidious",
"description": "Libellé pour l'option 'Mode sombre toujours activé pour Invidious' (options)."
},
"persistInvidiousPrefs": {
"message": "Conserver les préférences malveillantes (sous forme de cookie)",
"description": "Libellé pour 'Conserver les préférences malveillantes (sous forme de cookie)' option (options)."
"message": "Conserver les préférences dInvidious (sous forme de cookie)",
"description": "Libellé pour 'Conserver les préférences dInvidious (sous forme de cookie)' option (options)."
},
"generalTab": {
"message": "Général",

View File

@ -1,12 +1,15 @@
# Extension Store (AMO & Chrome Web Store) Listing
## Summary:
```
Redirige les requêtes les demandes Twitter, YouTube, Instagram et Google Maps vers des alternatives respectueuses de la vie privée. pour Twitter, YouTube, Instagram et Google Maps vers des alternatives respectueuses de la vie privée.
```
## Description:
```
Redirige les requètes pour Twitter, YouTube, Instagram et Google Maps vers des alternatives respectueuses de la confidentialité - <a href="https://nitter.net/">Nitter</a>, <a href="https://invidio.us/">Invidious</a>, <a href="https://bibliogram.art/">Bibliogram</a>, & <a href="https://www.openstreetmap.org">OpenStreetMap</a>.
Redirige les requêtes pour Twitter, YouTube, Instagram et Google Maps vers des alternatives respectueuses de la confidentialité - <a href="https://nitter.net/">Nitter</a>, <a href="https://invidio.us/">Invidious</a>, <a href="https://bibliogram.art/">Bibliogram</a>, & <a href="https://www.openstreetmap.org">OpenStreetMap</a>.
Permet de définir des instances personnalisées et d'activer ou désactiver toutes les redirections.
@ -23,14 +26,8 @@ Le code de cette extension Web est disponible sur <a href="https://github.com/Si
<b>★ Faire un don: 👨🏻‍💻</b>
Si vous aimez ce module complémentaire et si vous avez une bonne situation financière, pensez à <a href="https://www.buymeacoffee.com/SimonBrazell">m'acheter un café</a> ☕️ pour montrer que vous appréciez et soutenez la poursuite du projet.
<b>★ Nouveautés de cette version (v1.1.36) 🆕</b>
<ul>
<li>Added Russian language translation.</li>
<li>Fix Invidious autoplay parameter.</li>
</ul>
<b>★ Autorisations: </b>
<ul>
<li>Veuillez noter que l'accès à tous les événements de navigation sur le site Web (toutes les adresses URL), et pas seulement aux domaines cibles, est requis pour permettre aux redirections vidéo intégrées de se faire correctement. Pour le moment, je ne connais aucun autre moyen de réaliser des redirections iframe, je serais heureux d'entendre quelques suggestions à ce sujet cependant 🙂</li>
</ul>
```
```

View File

@ -0,0 +1,154 @@
{
"extensionName": {
"message": "Privacy Redirect",
"description": "Name of the extension."
},
"extensionDescription": {
"message": "Reindirizza Twitter, YouTube, Instagram ed altri verso alternative rispettose della privacy.",
"description": "Description of the extension."
},
"nitterInstance": {
"message": "Istanza di Nitter",
"description": "Label for Nitter instance field option (options)."
},
"invidiousInstance": {
"message": "Istanza di Invidious",
"description": "Label for Invidious instance field option (options)."
},
"bibliogramInstance": {
"message": "Istanza di Bibliogram",
"description": "Label for Bibliogram instance field option (options)."
},
"osmInstance": {
"message": "Istanza di OpenStreetMap",
"description": "Label for OSM instance field option (options)."
},
"redditInstance": {
"message": "Istanza di Reddit",
"description": "Label for Reddit instance field option (options)."
},
"searchEngineInstance": {
"message": "Istanza del motore di ricerca",
"description": "Label for Search Engine instance field option (options)."
},
"simplyTranslateInstance": {
"message": "Istanza di SimplyTranslate",
"description": "Label for SimplyTranslate instance field option (options)."
},
"disableNitter": {
"message": "Reindirizzamenti Nitter",
"description": "Label for enable/disable Nitter redirects option (options & pop-up)."
},
"disableInvidious": {
"message": "Reindirizzamenti Invidious",
"description": "Label for enable/disable Invidious redirects option (options & pop-up)."
},
"disableBibliogram": {
"message": "Reindirizzamenti Bibliogram",
"description": "Label for enable/disable Bibliogram redirects option (options & pop-up)."
},
"disableOsm": {
"message": "Reindirizzamenti OpenStreetMap",
"description": "Label for enable/disable OSM redirects option (options & pop-up)."
},
"disableReddit": {
"message": "Reindirizzamenti Reddit",
"description": "Label for enable/disable Reddit redirects option (options & pop-up)."
},
"disableSearchEngine": {
"message": "Reindirizzamenti motore di ricerca",
"description": "Label for enable/disable Search Engine redirects option (options & pop-up)."
},
"disableSimplyTranslate": {
"message": "Reindirizzamenti SimplyTranslate",
"description": "Label for enable/disable SimplyTranslate redirects option (options & pop-up)."
},
"alwaysProxy": {
"message": "Usa sempre il proxy per i video su Invidious",
"description": "Label for 'Always proxy videos through Invidious' option (options)."
},
"onlyEmbeddedVideo": {
"message": "Reindirizza solo i video incorporati verso Invidious",
"description": "Label for 'Only redirect embedded video to Invidious' option (options)."
},
"videoQuality": {
"message": "Qualità video di Invidious",
"description": "Label for 'Invidious Video Quality' option (options)."
},
"removeTwitterSW": {
"message": "Rimuovi proattivamente il service worker di Twitter",
"description": "Label for 'Proactively remove Twitter service worker' option (options)."
},
"invidiousDarkMode": {
"message": "Modalità scura di Invidious sempre attiva",
"description": "Label for 'Invidious dark mode always on' option (options)."
},
"persistInvidiousPrefs": {
"message": "Mantieni le preferenze di Invidious (con cookie)",
"description": "Label for 'Persist Invidious preferences (as cookie)' option (options)."
},
"generalTab": {
"message": "Generali",
"description": "General tab (options)."
},
"advancedTab": {
"message": "Avanzate",
"description": "Advanced tab (options)."
},
"exceptionsTab": {
"message": "Eccezioni",
"description": "Exceptions tab (options)."
},
"exceptionsDescriptionP1": {
"message": "Inserisci un URL o espressione regolare da escludere dai reindirizzamenti.",
"description": "A description of the 'Exceptions' feature paragraph 1 (options)."
},
"exceptionsDescriptionP2": {
"message": "Tutte le richieste verso o da un URL corrispondente all'eccezione saranno escluse dai reindirizzamenti.",
"description": "A description of the 'Exceptions' feature paragraph 2 (options)."
},
"exceptionsDescriptionP3": {
"message": "Nota - Supporta le espressioni regolari JavaScript, esclusi gli slash.",
"description": "A description of the 'Exceptions' feature paragraph 3 (options)."
},
"addException": {
"message": "Aggiungi eccezione",
"description": "'Add Exceptions' button (options)."
},
"moreOptions": {
"message": "Altre opzioni",
"description": "More Options button (pop-up)."
},
"privacy": {
"message": "Privacy",
"description": "Extension title - Privacy (pop-up)."
},
"redirect": {
"message": "Redirect",
"description": "Extension title - Redirect (pop-up)."
},
"version": {
"message": "Versione",
"description": "Version"
},
"useFreeTube": {
"message": "Usa FreeTube al posto di Invidious quando possibile",
"description": "Label for 'Use FreeTube over Invidious when possible' option (options)."
},
"nitterRandomPool": {
"message": "Gruppo di istanze Nitter casuali (separate da virgola)",
"description": "Label for 'Nitter random instance pool (comma-separated)' option (options)."
},
"invidiousRandomPool": {
"message": "Gruppo di istanze Invidious casuali (separate da virgola)",
"description": "Label for 'Invidious random instance pool (comma-separated)' option (options)."
},
"bibliogramRandomPool": {
"message": "Gruppo di istanze Bibliogram casuali (separate da virgola)",
"description": "Label for 'Bibliogram random instance pool (comma-separated)' option (options)."
},
"randomInstancePlaceholder": {
"message": "Istanza casuale (nessuna selezione)",
"description": "Input placeholder for provider instance settings that select a random instance from a pool when none is selected"
}
}

33
src/_locales/it/store.md Normal file
View File

@ -0,0 +1,33 @@
# Extension Store (AMO & Chrome Web Store) Listing
## Summary:
```
Una semplice estensione che reindirizza le richieste di Twitter, YouTube, Instagram e Google Maps verso alternative rispettose della privacy.
```
## Description:
```
Reindirizza le richieste di Twitter, YouTube, Instagram e Google Maps verso alternative rispettose della privacy - <a href='https://nitter.net/'>Nitter</a>, <a href='https://invidio.us/'>Invidious</a>, <a href='https://bibliogram.art/'>Bibliogram</a> e <a href='https://www.openstreetmap.org'>OpenStreetMap</a>.
Permette di impostare istanze personalizzate, attivare/disattivare tutti i reindirizzamenti e altro.
<b>★ Maggiori informazioni: </b>
<ul>
<li><a href='https://github.com/zedeus/nitter#nitter-wip'>Nitter</a></li>
<li><a href='https://github.com/omarroth/invidious#invidious'>Invidious</a></li>
<li><a href='https://github.com/cloudrac3r/bibliogram#bibliogram'>Bibliogram</a></li>
<li><a href='https://wiki.openstreetmap.org/'>OpenStreetMap</a></li>
</ul>
Il codice sorgente di questa estensione è disponibile su <a href='https://github.com/SimonBrazell/privacy-redirect'>Github</a>.
<b>★ Dona: 👨🏻‍💻</b>
Se ti piace questa estensione e te lo puoi permettere, considera di <a href='https://www.buymeacoffee.com/SimonBrazell'>offrirmi un caffè</a> ☕️ per mostrare il tuo apprezzamento e supportare lo sviluppo del progetto.
<b>★ Permessi: </b>
<ul>
<li>Si prega di notare che l'accesso a tutti gli eventi di navigazione web (tutti gli URL), non solo ai domini di destinazione, è necessario per permettere i reindirizzamenti dei video incorporati. Ad oggi non conosco un altro modo per fare i reindirizzamenti di iframe, sarò felice di ricevere suggerimenti al riguardo 🙂</li>
</ul>
```

View File

@ -0,0 +1,110 @@
{
"extensionName": {
"message": "Privacy Redirect",
"description": "Nazwa rozszerzenia."
},
"extensionDescription": {
"message": "Przekierowuje serwisy takie jak: Twitter, YouTube, Instagram i Google Maps do alternatyw sprzyjających prywatności.",
"description": "Opis rozszerzenia."
},
"nitterInstance": {
"message": "Instancja Nitter",
"description": "Etykieta dla pola wyboru instancji Nitter (opcje)."
},
"invidiousInstance": {
"message": "Instancja Invidious",
"description": "Etykieta dla pola wyboru instancji Invidious (opcje)."
},
"bibliogramInstance": {
"message": "Instancja Bibliogram",
"description": "Etykieta dla pola wyboru instancji Bibliogram (opcje)."
},
"osmInstance": {
"message": "Instancja OpenStreetMap",
"description": "Etykieta dla pola wyboru instancji OpenStreetMap (opcje)."
},
"disableNitter": {
"message": "Przekierowanie Nitter",
"description": "Etykieta dla włączenia/wyłączenia opcji przekierowania Nitter (opcje i okno pop-up)."
},
"disableInvidious": {
"message": "Przekierowanie Invidious ",
"description": "Etykieta dla włączenia/wyłączenia opcji przekierowania Invidious (opcje i okno pop-up)."
},
"disableBibliogram": {
"message": "Przekierowanie Bibliogram",
"description": "Etykieta dla włączenia/wyłączenia opcji przekierowania Bibliogram (opcje i okno pop-up)."
},
"disableOsm": {
"message": "Przekierowanie OpenStreetMap",
"description": "Etykieta dla włączenia/wyłączenia opcji przekierowania OpenStreetMap (opcje i okno pop-up)."
},
"alwaysProxy": {
"message": "Zawsze buforuj i wyświetlaj odnośniki wideo z YouTube poprzez Invidious",
"description": "Etykieta dla opcji 'Zawsze buforuj i wyświetlaj odnośniki wideo poprzez Invidious'."
},
"onlyEmbeddedVideo": {
"message": "Jedynie przekieruj odnośniki wideo do instancji Invidious",
"description": "Etykieta dla opcji 'Jedynie przekieruj odnośniki wideo do instancji Invidious'."
},
"videoQuality": {
"message": "Jakość wideo Invidious",
"description": "Etykieta dla opcji 'Jakość wideo Invidious'."
},
"removeTwitterSW": {
"message": "Proaktywnie usuwaj skrypty serwisowe (service worker) Twittera",
"description": "Etykieta dla opcji 'Proaktywnie usuwaj skrypty serwisowe (service worker) Twittera'."
},
"invidiousDarkMode": {
"message": "Tryb ciemny dla Invidious zawsze włączony",
"description": "Etykieta dla opcji 'Tryb ciemny dla Invidious zawsze włączony'."
},
"persistInvidiousPrefs": {
"message": "Zapisz ustawienia Invidious (jako plik cookie)",
"description": "Etykieta dla 'Zapisz ustawienia Invidious (jako plik cookie)'."
},
"generalTab": {
"message": "Główne",
"description": "Zakładka Główne (opcje)."
},
"advancedTab": {
"message": "Advanced",
"description": "Zakładka zaawansowane (opcje)."
},
"exceptionsTab": {
"message": "Wyjątki",
"description": "Zakładka wyjątki (opcje)."
},
"exceptionsDescriptionP1": {
"message": "Wprowadź adres URL lub wyrażenie regularne, które zostanie wyłączone z przekierowania. ",
"description": "Opis funkcji 'Wyjątki' paragraf 1 (opcje)."
},
"exceptionsDescriptionP2": {
"message": "Wszystkie żądania dla lub inicjalizujące z adresu URL które spełniają wyjątek zostaną wyłączone z przekierowania.",
"description": "Opis funkcji 'Wyjątki' paragraf 2 (opcje)."
},
"exceptionsDescriptionP3": {
"message": "Informacja - Wspierane są wyrażenia regularne JavaScript, wyłączając ukośniki lewe zamykające.",
"description": "Opis funkcji 'Wyjątki' paragraf 3 (opcje)."
},
"addException": {
"message": "Dodaj wyjątek",
"description": "Przycisk 'Dodaj wyjątek' (opcje)."
},
"moreOptions": {
"message": "Więcej opcji",
"description": "Przycisk 'Więcej opcji' (okno pop-up)."
},
"privacy": {
"message": "Prywatność",
"description": "Tytuł rozszerzenia - Privacy (okno pop-up)."
},
"redirect": {
"message": "Redirect",
"description": "Tytuł rozszerzenia - Redirect (pop-up)."
},
"version": {
"message": "Version",
"description": "Wersja"
}
}

32
src/_locales/pl/store.md Normal file
View File

@ -0,0 +1,32 @@
# Extension Store (AMO & Chrome Web Store) Listing
## Summary:
```
Prosta wtyczka która przekierowuje żądania Twitter, YouTube, Instagram oraz Google Maps na odpowiedniki przyjazne dla prywatności.
```
## Description:
```
Przekierowuje żądania Twitter, YouTube, Instagram oraz Google Maps na odpowiedniki przyjazne dla prywatności - <a href='https://nitter.net/'>Nitter</a>, <a href='https://invidio.us/'>Invidious</a>, <a href='https://bibliogram.art/'>Bibliogram</a>, & <a href='https://www.openstreetmap.org'>OpenStreetMap</a>.
Umożliwia ustawienie niestandardowych instancji usług, przełączania przekierowania jako aktywne/nieaktwne i o wiele więcej.
<b>★ Więcej informacji: </b>
<ul>
<li><a href='https://github.com/zedeus/nitter#nitter-wip'>Nitter</a></li>
<li><a href='https://github.com/omarroth/invidious#invidious'>Invidious</a></li>
<li><a href='https://github.com/cloudrac3r/bibliogram#bibliogram'>Bibliogram</a></li>
<li><a href='https://wiki.openstreetmap.org/'>OpenStreetMap</a></li>
</ul>
Kod źródłowy tego rozszerzenia jest dostępny na: <a href='https://github.com/SimonBrazell/privacy-redirect'>Github</a>.
<b>★ Donate: 👨🏻‍💻</b>
Jeżeli lubisz to rozszerzenie i chcesz wesprzeć autora finanosowo, proszę pomyśl o <a href='https://www.buymeacoffee.com/SimonBrazell'>zaserwowaniu małej czarnej</a> ☕️ aby pokazać swoją wdzięczność i wesprzeć możliwości kontynuowania projektu.
<b>★ Uprawnienia: </b>
<ul>
<li>Zwróć uwagę, że dostęp do wszystkich zdarzeń dotyczących nawigacji po stronach (wszystkie adresy URL) jest wymagany dla poprawnego odtwarzania osadzonych plików wideo. Obecnie nie znam innych możliwości aby obsłużyć przekierowania ramek iFrame, będę wdzięczny za sugestie 🙂</li>
</ul>
```

View File

@ -23,6 +23,18 @@
"message": "Сервис OpenStreetMap",
"description": "Название настройки (в настройках) поля сервиса OSM."
},
"redditInstance": {
"message": "Сервис Reddit",
"description": "Название настройки (в настройках) поля сервиса Reddit."
},
"searchEngineInstance": {
"message": "Сервис поисковой системы",
"description": "Название настройки (в настройках) поля сервиса поисковой системы."
},
"simplyTranslateInstance": {
"message": "Сервис SimplyTranslate",
"description": "Название настройки (в настройках) поля сервиса SimplyTranslate."
},
"disableNitter": {
"message": "Перенаправление на Nitter",
"description": "Название настройки для включения/выключения перенаправления на Nitter (в настройках и всплывающем окне)."
@ -39,6 +51,18 @@
"message": "Перенаправление на OpenStreetMap",
"description": "Название настройки для включения/выключения перенаправления на OSM (в настройках и всплывающем окне)."
},
"disableReddit": {
"message": "Перенаправление Reddit",
"description": "Название настройки для включения/выключения перенаправления Reddit (в настройках и всплывающем окне)."
},
"disableSearchEngine": {
"message": "Перенаправление поисковой системы",
"description": "Название настройки для включения/выключения перенаправления поисковой системы (в настройках и всплывающем окне)."
},
"disableSimplyTranslate": {
"message": "Перенаправление на SimplyTranslate",
"description": "Название настройки для включения/выключения перенаправления на SimplyTranslate (в настройках и всплывающем окне)."
},
"theme": {
"message": "Тема",
"description": "Название настройки для 'Тема' (в настройках)."
@ -126,5 +150,25 @@
"version": {
"message": "Версия",
"description": "Версия."
},
"useFreeTube": {
"message": "Использовать FreeTube поверх Invidious при возможности",
"description": "Название настройки для 'Использовать FreeTube поверх Invidious при возможности' (в настройках)."
},
"nitterRandomPool": {
"message": "Список случайных сервисов Nitter (разделяется запятой)",
"description": "Название настройки для 'Список случайных сервисов Nitter (разделяется запятой)' (в настройках)."
},
"invidiousRandomPool": {
"message": "Список случайных сервисов Invidious (разделяется запятой)",
"description": "Название настройки для 'Список случайных сервисов Invidious (разделяется запятой)' (в настройках)."
},
"bibliogramRandomPool": {
"message": "Список случайных сервисов Bibliogram (разделяется запятой)",
"description": "Название настройки для 'Список случайных сервисов Bibliogram (разделяется запятой)' (в настройках)."
},
"randomInstancePlaceholder": {
"message": "Случайный сервис (ничего не выбрано)",
"description": "Заглушка в настройках сервиса провайдера с выбором случайного сервиса из списка, если ничего не выбрано"
}
}

View File

@ -1,10 +1,13 @@
# Extension Store (AMO & Chrome Web Store) Listing
## Summary:
```
Простое расширение для браузера, которое перенаправляет запросы к Twitter, YouTube, Instagram & Google Maps на альтернативные сервисы, дружелюбные к приватности.
```
## Description:
```
Перенаправляет запросы к Twitter, YouTube, Instagram, & Google Maps на альтернативные сервисы, дружелюбные к приватности - <a href='https://nitter.net/'>Nitter</a>, <a href='https://invidio.us/'>Invidious</a>, <a href='https://bibliogram.art/'>Bibliogram</a> и <a href='https://www.openstreetmap.org'>OpenStreetMap</a>.
@ -23,12 +26,6 @@
<b>★ Пожертвовать: 👨🏻‍💻</b>
Если вам нравится это расширение и вы можете помочь финансово, пожалуйста, <a href='https://www.buymeacoffee.com/SimonBrazell'>купите мне кофе</a> ☕ и покажите ваше одобрение и поддержку развития проекта.
<b>★ Что нового в этой версии (v1.1.36) 🆕</b>
<ul>
<li>Добавлен перевод на русский язык.</li>
<li>Исправлен параметр автоматического воспроизведения Invidious.</li>
</ul>
<b>★ Разрешения: </b>
<ul>
<li>Важно: доступ ко всем сайтам (URL), не только к целевым, требуется для разрешения перенаправления встроенных видео. В данный момент я не знаю, как осуществить перенаправление iframe, буду рад выслушать ваши предложения 🙂</li>

View File

@ -0,0 +1,146 @@
{
"extensionName": {
"message": "Privacy Redirect",
"description": "Uzantı ismi."
},
"extensionDescription": {
"message": "Twitter, YouTube, Instagram, Google Haritalar, Reddit & Google Arama bağlantılarını gizlilik dostu alternatiflerine yönlendirir.",
"description": "Uzantııklaması."
},
"nitterInstance": {
"message": "Nitter Servisi",
"description": "Nitter Servisi seçeneği için etiket (seçenekler)."
},
"invidiousInstance": {
"message": "Invidious Servisi",
"description": "Invidious Servisi seçeneği için etiket (seçenekler)."
},
"bibliogramInstance": {
"message": "Bibliogram Servisi",
"description": "Bibliogram Servisi seçeneği için etiket (seçenekler)."
},
"osmInstance": {
"message": "OpenStreetMap Servisi",
"description": "OSM Servisi seçeneği için etiket (seçenekler)."
},
"redditInstance": {
"message": "Reddit Servisi",
"description": "Reddit Servisi seçeneği için etiket (seçenekler)."
},
"searchEngineInstance": {
"message": "Arama Motoru Servisi",
"description": "Arama Motoru Servisi seçeneği için etiket (seçenekler)."
},
"disableNitter": {
"message": "Nitter Yönlendirmesi",
"description": "Nitter Yönlendirmesi'ni etkinleştirme/devre dışı bırakma seçeneği için etiket (seçenekler & açılır pencere)."
},
"disableInvidious": {
"message": "Invidious Yönlendirmesi",
"description": "Invidious Yönlendirmesi'ni etkinleştirme/devre dışı bırakma seçeneği için etiket (seçenekler & açılır pencere)."
},
"disableBibliogram": {
"message": "Bibliogram Yönlendirmesi",
"description": "Bibliogram Yönlendirmesi'ni etkinleştirme/devre dışı bırakma seçeneği için etiket (seçenekler & açılır pencere)."
},
"disableOsm": {
"message": "OpenStreetMap Yönlendirmesi",
"description": "OSM Yönlendirmesi'ni etkinleştirme/devre dışı bırakma seçeneği için etiket (seçenekler & açılır pencere)."
},
"disableReddit": {
"message": "Reddit Yönlendirmesi",
"description": "Reddit Yönlendirmesi'ni etkinleştirme/devre dışı bırakma seçeneği için etiket (seçenekler & açılır pencere)."
},
"disableSearchEngine": {
"message": "Arama Motoru Yönlendirmesi",
"description": "Arama Motoru Yönlendirmesi'ni etkinleştirme/devre dışı bırakma seçeneği için etiket (seçenekler & açılır pencere)."
},
"alwaysProxy": {
"message": "Videoları her zaman Invidious üzerinden geçir",
"description": "'Videoları her zaman Invidious üzerinden geçir' seçeneği için etiket (seçenekler)."
},
"onlyEmbeddedVideo": {
"message": "Sadece siteye gömülü videoları Invidious'a yönlendir",
"description": "'Sadece siteye gömülü videoları Invidious'a yönlendir' seçeneği için etiket (seçenekler)."
},
"videoQuality": {
"message": "Invidious Video Kalitesi",
"description": "'Invidious Video Kalitesi' seçeneği için etiket (seçenekler)."
},
"removeTwitterSW": {
"message": "Twitter servis çalışanını proaktif olarak kaldır",
"description": "'Twitter servis çalışanını proaktif olarak kaldır' seçeneği için etiket (seçenekler)."
},
"invidiousDarkMode": {
"message": "Invidious her zaman açık karanlık mod",
"description": "'Invidious her zaman açık karanlık mod' seçeneği için etiket (seçenekler)."
},
"persistInvidiousPrefs": {
"message": "Invidious tercihlerini kaydet (çerez olarak)",
"description": "'Persist Invidious preferences (as cookie)' option (seçenekler)."
},
"generalTab": {
"message": "Genel",
"description": "Genel sekme (seçenekler)."
},
"advancedTab": {
"message": "Gelişmiş",
"description": "Gelişmiş sekme (seçenekler)."
},
"exceptionsTab": {
"message": "İstisnalar",
"description": "İstisnalar sekmesi (seçenekler)."
},
"exceptionsDescriptionP1": {
"message": "Yönlendirmelerden hariç tutulacak bir URL veya düzenli ifade gir",
"description": "'İstisnalar' özelliği paragraf 1'in açıklaması (seçenekler)."
},
"exceptionsDescriptionP2": {
"message": "İstisnayla eşleşen bir URL'ye yönelik veya URL'den çıkan bütün bağlantılar yönlendirmelerden hariç tutulacak",
"description": "'İstisnalar' özelliği paragraf 2'nin açıklaması (seçenekler)."
},
"exceptionsDescriptionP3": {
"message": "Not - JavaScript düzenli ifadelerini destekler, kapalı eğik çizgiler kullanılmadan.",
"description": "'İstisnalar' özelliği paragraf 3'ün açıklaması (seçenekler)."
},
"addException": {
"message": "İstisna ekle",
"description": "'İstisna ekle' butonu (seçenekler)"
},
"moreOptions": {
"message": "Daha Fazla Seçenek",
"description": "Daha Fazla Seçenek butonu (açılır pencere)."
},
"privacy": {
"message": "Gizlilik",
"description": "Uzantı ismi - Gizlilik (açılır pencere)."
},
"redirect": {
"message": "Yönlendir",
"description": "Uzantı ismi - Yönlendir (açılır pencere)."
},
"version": {
"message": "Sürüm",
"description": "Sürüm"
},
"useFreeTube": {
"message": "Mümkün olduğunda Invidious yerine FreeTube kullan",
"description": "'Mümkün olduğunda Invidious yerine FreeTube kullan' seçeneği etiketi (seçenekler)."
},
"nitterRandomPool": {
"message": "Nitter rastgele servis havuzu (virgülle ayrılmış)",
"description": "'Nitter rastgele servis havuzu (virgülle ayrılmış)' seçeneği etiketi (seçenekler)."
},
"invidiousRandomPool": {
"message": "Invidious rastgele servis havuzu (virgülle ayrılmış)",
"description": "'Invidious rastgele servis havuzu (virgülle ayrılmış)' seçeneği etiketi (seçenekler)."
},
"bibliogramRandomPool": {
"message": "Bibliogram rastgele servis havuzu (virgülle ayrılmış)",
"description": "'Bibliogram rastgele servis havuzu (virgülle ayrılmış)' seçeneği etiketi (seçenekler)."
},
"randomInstancePlaceholder": {
"message": "Rastgele servis (hiçbir servis seçilmedi)",
"description": "Hiçbir servis seçilmediğinde bir havuzdan rastgele servis seçen sağlayıcı servis ayarları için yer tutucu"
}
}

56
src/_locales/tr/store.md Normal file
View File

@ -0,0 +1,56 @@
# Extension Store (AMO & Chrome Web Store) Listing
## Summary:
```
Twitter, YouTube, Instagram & Google Haritalar bağlantılarını gizlilik dostu alternatiflerine yönlendiren basit bir web uzantısı.
```
## Description (AMO):
```
Twitter, YouTube, Instagram, & Google Haritalar bağlantılarını gizlilik dostu alternatiflerine yönlendirir - <a href='https://nitter.net/'>Nitter</a>, <a href='https://invidio.us/'>Invidious</a>, <a href='https://bibliogram.art/'>Bibliogram</a>, & <a href='https://www.openstreetmap.org'>OpenStreetMap</a>.
Allows for setting custom instances, toggling all redirects on/off and more.
<b>★ Daha Fazla Bilgi: </b>
<ul>
<li><a href='https://github.com/zedeus/nitter#nitter-wip'>Nitter</a></li>
<li><a href='https://github.com/omarroth/invidious#invidious'>Invidious</a></li>
<li><a href='https://github.com/cloudrac3r/bibliogram#bibliogram'>Bibliogram</a></li>
<li><a href='https://wiki.openstreetmap.org/'>OpenStreetMap</a></li>
</ul>
Bu web uzantısının kaynak kodu <a href='https://github.com/SimonBrazell/privacy-redirect'>Github</a>'da mevcut'.
<b>★ Bağış At: 👨🏻‍💻</b>
Eğer bu uzantıyı seviyorsan ve minnettarlığını gösterip projenin devamını destekliyorsan ve bana bir <a href='https://www.buymeacoffee.com/SimonBrazell'>kahve alıcak</a> ☕️ kadar maddi durumun varsa.
<b>★ İzinler: </b>
<ul>
<li>Lütfen aklınızda bulundurun, siteye gömülü video yönlendirmelerinin çalışması için bütün website dolaşım etkinliklerine, sadece hedef alan adlarına değil, erişim gereklidir. Şu anda çerçeve yönlendirmenin başka hiçbir yolunu bilmiyorum, bununla ilgili bazı öneriler duymaya sevinirim 🙂</li>
</ul>
```
## Description (Chrome & Mircosoft):
```
★ Daha Fazla Bilgi:
• Nitter - https://github.com/zedeus/nitter
• Invidious - https://github.com/omarroth/invidious
• Bibliogram - https://github.com/cloudrac3r/bibliogram
• OpenStreetMap - https://wiki.openstreetmap.org
Özel örnekler ayarlamaya, tüm yönlendirmeleri açıp kapatmaya ve daha fazlasına izin verir.
Bu web uzantısının kaynak kodu Github'da mevcut' - https://github.com/SimonBrazell/privacy-redirect
★ Bağış At: 👨🏻‍💻
Eğer bu uzantıyı seviyorsan ve minnettarlığını gösterip projenin devamını destekliyorsan ve bana bir kahve alıcak ☕️ kadar maddi durumun varsa.
☕️ https://www.buymeacoffee.com/SimonBrazell ☕️
🍻 https://liberapay.com/SimonBrazell/donate 🍻
★ İzinler:
• Lütfen aklınızda bulundurun, siteye gömülü video yönlendirmelerinin çalışması için bütün website dolaşım etkinliklerine, sadece hedef alan adlarına değil, erişim gereklidir. Şu anda çerçeve yönlendirmenin başka hiçbir yolunu bilmiyorum, bununla ilgili bazı öneriler duymaya sevinirim 🙂
```

View File

@ -4,95 +4,95 @@
"description": "Name of the extension."
},
"extensionDescription": {
"message": "Redirects Twitter, YouTube, Instagram & Google Maps requests to privacy friendly alternatives.",
"message": "将 Twitter、YouTube、Instagram 和 Google Maps 重定向至尊重隐私的替代品",
"description": "Description of the extension."
},
"nitterInstance": {
"message": "Nitter Instance",
"message": "Nitter 实例",
"description": "Label for Nitter instance field option (options)."
},
"invidiousInstance": {
"message": "Invidious Instance",
"message": "Invidious 实例",
"description": "Label for Invidious instance field option (options)."
},
"bibliogramInstance": {
"message": "Bibliogram Instance",
"message": "Bibliogram 实例",
"description": "Label for Bibliogram instance field option (options)."
},
"osmInstance": {
"message": "OpenStreetMap Instance",
"message": "OpenStreetMap 实例",
"description": "Label for OSM instance field option (options)."
},
"disableNitter": {
"message": "Nitter Redirects",
"message": "Nitter 重定向",
"description": "Label for enable/disable Nitter redirects option (options & pop-up)."
},
"disableInvidious": {
"message": "Invidious Redirects",
"message": "Invidious 重定向",
"description": "Label for enable/disable Invidious redirects option (options & pop-up)."
},
"disableBibliogram": {
"message": "Bibliogram Redirects",
"message": "Bibliogram 重定向",
"description": "Label for enable/disable Bibliogram redirects option (options & pop-up)."
},
"disableOsm": {
"message": "OpenStreetMap Redirects",
"message": "OpenStreetMap 重定向",
"description": "Label for enable/disable OSM redirects option (options & pop-up)."
},
"alwaysProxy": {
"message": "Always proxy videos through Invidious",
"message": "使用 Invidious 时始终使用视频代理",
"description": "Label for 'Always proxy videos through Invidious' option (options)."
},
"onlyEmbeddedVideo": {
"message": "Only redirect embedded video to Invidious",
"message": "只重定向嵌入视频至 Invidious",
"description": "Label for 'Only redirect embedded video to Invidious' option (options)."
},
"videoQuality": {
"message": "Invidious Video Quality",
"message": "Invidious 视频画质",
"description": "Label for 'Invidious Video Quality' option (options)."
},
"removeTwitterSW": {
"message": "Proactively remove Twitter service worker",
"message": "主动移除 Twitter 后台脚本",
"description": "Label for 'Proactively remove Twitter service worker' option (options)."
},
"invidiousDarkMode": {
"message": "Invidious dark mode always on",
"message": "Invidious 始终使用夜间模式",
"description": "Label for 'Invidious dark mode always on' option (options)."
},
"persistInvidiousPrefs": {
"message": "Persist Invidious preferences (as cookie)",
"message": "以 cookie 形式记住 Invidious 设置",
"description": "Label for 'Persist Invidious preferences (as cookie)' option (options)."
},
"generalTab": {
"message": "General",
"message": "常规",
"description": "General tab (options)."
},
"advancedTab": {
"message": "Advanced",
"message": "高级",
"description": "Advanced tab (options)."
},
"exceptionsTab": {
"message": "Exceptions",
"message": "例外",
"description": "Exceptions tab (options)."
},
"exceptionsDescriptionP1": {
"message": "Enter a URL or Regular Expression to be excluded from redirects.",
"message": "请输入一个不要重定向 URL 链接或正则表达式。",
"description": "A description of the 'Exceptions' feature paragraph 1 (options)."
},
"exceptionsDescriptionP2": {
"message": "All requests for or initiating from a URL that matches the exception will be excluded from redirects.",
"message": "若发起请求或访问的页面 URL 符合任一表达式,则插件将不会将其重定向。",
"description": "A description of the 'Exceptions' feature paragraph 2 (options)."
},
"exceptionsDescriptionP3": {
"message": "Note - Supports JavaScript regular expressions, excluding the enclosing forward slashes.",
"message": "注:支持 JavaScript 正则表达式,且无须用正斜杠始末。",
"description": "A description of the 'Exceptions' feature paragraph 3 (options)."
},
"addException": {
"message": "Add Exception",
"message": "添加例外",
"description": "'Add Exceptions' button (options)."
},
"moreOptions": {
"message": "More Options",
"message": "更多设置",
"description": "More Options button (pop-up)."
},
"privacy": {
@ -104,7 +104,7 @@
"description": "Extension title - Redirect (pop-up)."
},
"version": {
"message": "Version",
"message": "版本",
"description": "Version"
}
}

View File

@ -0,0 +1,33 @@
# Extension Store (AMO & Chrome Web Store) Listing
## Summary:
```
一个简单的扩展程序来将 Twitter、YouTube、Instagram 和 Google地图重定向至尊重隐私的替代品。
```
## Description:
```
将 Twitter、YouTube、Instagram 和 Google地图重定向至尊重隐私的替代品 <a href='https://nitter.net/'>Nitter</a><a href='https://invidio.us/'>Invidious</a><a href='https://bibliogram.art/'>Bibliogram</a><a href='https://www.openstreetmap.org'>OpenStreetMap</a>
允许自定义实例,开关重定向等设定。
<b>★ 更多详细:ℹ️</b>
<ul>
<li><a href='https://github.com/zedeus/nitter#nitter-wip'>Nitter</a></li>
<li><a href='https://github.com/iv-org/invidious#invidious'>Invidious</a></li>
<li><a href='https://sr.ht/~cadence/bibliogram/#a-hrefhttpsbibliogramartbibliograma'>Bibliogram</a></li>
<li><a href='https://wiki.openstreetmap.org/'>OpenStreetMap</a></li>
</ul>
本扩展的源代码可在 <a href='https://github.com/SimonBrazell/privacy-redirect'>Github</a> 上查看。
<b>★ 捐赠:👨🏻‍💻</b>
若您喜欢本扩展程序,且有闲钱,不妨<a href='https://www.buymeacoffee.com/SimonBrazell'>给我买杯咖啡</a>来表达您对这个项目的感谢与支持。
<b>★ 权限:ℹ️</b>
<ul>
<li>请注意,您需授予查看所有 URL不只是需要重定向的URL网站导向活动的权限以来重定向嵌入的视频。目前我不知道其他重定向iframe的方法有能者请解囊相助 🙂</li>
</ul>
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 688 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1014 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 233 B

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 709 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 690 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
src/assets/images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@ -0,0 +1,12 @@
function filterInstances(instances) {
return instances.filter((instance) => !instance.includes(".onion"));
}
function getRandomInstance(instances) {
return instances[~~(instances.length * Math.random())];
}
export default {
filterInstances,
getRandomInstance,
};

View File

@ -0,0 +1,52 @@
const targets = /https?:\/\/(((www|maps)\.)?(google\.).*(\/maps)|maps\.(google\.).*)/;
const redirects = ["https://openstreetmap.org"];
const mapCentreRegex = /@(-?\d[0-9.]*),(-?\d[0-9.]*),(\d{1,2})[.z]/;
const dataLatLngRegex = /(!3d|!4d)(-?[0-9]{1,10}.[0-9]{1,10})/g;
const placeRegex = /\/place\/(.*)\//;
const travelModes = {
driving: "fossgis_osrm_car",
walking: "fossgis_osrm_foot",
bicycling: "fossgis_osrm_bike",
transit: "fossgis_osrm_car", // not implemented on OSM, default to car.
};
const layers = {
none: "S",
transit: "T",
traffic: "S", // not implemented on OSM, default to standard.
bicycling: "C",
};
function addressToLatLng(address, callback) {
const xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = () => {
if (xmlhttp.readyState === XMLHttpRequest.DONE) {
if (xmlhttp.status === 200) {
const json = JSON.parse(xmlhttp.responseText)[0];
if (json) {
callback(
`${json.lat}%2C${json.lon}`,
`${json.boundingbox[2]},${json.boundingbox[1]},${json.boundingbox[3]},${json.boundingbox[0]}`
);
}
} else {
console.info("Error: Status is " + xmlhttp.status);
}
}
};
xmlhttp.open(
"GET",
`https://nominatim.openstreetmap.org/search/${address}?format=json&limit=1`,
false
);
xmlhttp.send();
}
export default {
targets,
redirects,
mapCentreRegex,
dataLatLngRegex,
placeRegex,
travelModes,
layers,
addressToLatLng,
};

View File

@ -0,0 +1,27 @@
const targets = /https?:\/\/(((www|maps)\.)?(google\.).*(\/search)|search\.(google\.).*)/;
const redirects = [
{ link: "https://duckduckgo.com", q: "/" },
{ link: "https://startpage.com", q: "/search/" },
{ link: "https://www.ecosia.org", q: "/search" },
{ link: "https://www.qwant.com", q: "/" },
{ link: "https://www.mojeek.com", q: "/search" },
{ link: "https://search.snopyta.org", q: "/" },
{ link: "https://searx.info", q: "/" },
{ link: "https://searx.be", q: "/" },
{ link: "https://search.disroot.org", q: "/" },
{ link: "https://searx.tuxcloud.net", q: "/" },
{ link: "https://searx.ninja", q: "/" },
{ link: "https://tromland.org/searx", q: "/search" },
{ link: "https://engine.presearch.org", q: "/search" },
{ link: "https://searx.silkky.cloud", q: "/" },
{ link: "https://search.trom.tf", q: "/" },
{ link: "https://whooglesearch.net", q: "/search" },
{ link: "https://whoogle.sdf.org", q: "/search" },
{ link: "https://whoogle.himiko.cloud", q: "/search" },
{ link: "https://whoogle-search.zeet.app", q: "/search" },
];
export default {
targets,
redirects,
};

View File

@ -0,0 +1,8 @@
const targets = ["translate.google.com", "translate.google.no"];
const redirects = ["https://translate.metalune.xyz"];
export default {
targets,
redirects,
};

View File

@ -0,0 +1,49 @@
const targets = [
"instagram.com",
"www.instagram.com",
"help.instagram.com",
"about.instagram.com",
];
const redirects = [
"https://bibliogram.art",
"https://bibliogram.snopyta.org",
"https://bibliogram.pussthecat.org",
"https://bibliogram.nixnet.services",
"https://bibliogram.ethibox.fr",
"https://bibliogram.hamster.dance",
"https://insta.trom.tf",
"https://bib.actionsack.com"
];
const reservedPaths = [
"about",
"explore",
"support",
"press",
"api",
"privacy",
"safety",
"admin",
"graphql",
"accounts",
"help",
"terms",
"contact",
"blog",
"igtv",
"u",
"p",
"fragment",
"imageproxy",
"videoproxy",
".well-known",
"tv",
"reel",
];
const bypassPaths = /\/(accounts\/|embeds?.js)/;
export default {
targets,
redirects,
reservedPaths,
bypassPaths,
};

View File

@ -0,0 +1,32 @@
const targets = [
"www.reddit.com",
"np.reddit.com",
"new.reddit.com",
"amp.reddit.com",
"i.redd.it",
"redd.it",
"old.reddit.com",
];
const redirects = [
// libreddit: privacy w/ modern UI
"https://libredd.it",
"https://libreddit.spike.codes",
"https://libreddit.kavin.rocks",
"https://libreddit.insanity.wtf",
"https://libreddit.dothq.co",
"https://libreddit.silkky.cloud",
"https://libreddit.himiko.cloud",
"https://reddit.artemislena.eu",
// teddit: privacy w/ old UI
"https://teddit.net",
"https://teddit.ggc-project.de",
"https://teddit.kavin.rocks",
"https://snew.notabug.io",
];
const bypassPaths = /\/(gallery\/poll\/rpan\/settings\/topics)/;
export default {
targets,
redirects,
bypassPaths,
};

View File

@ -0,0 +1,44 @@
/*
Please remember to also update the src/manifest.json file
(content_scripts > matches, 'remove-twitter-sw.js')
when updating this list:
*/
const targets = [
"twitter.com",
"www.twitter.com",
"mobile.twitter.com",
"pbs.twimg.com",
"video.twimg.com",
];
/*
Please remember to also update the
src/assets/javascripts/remove-twitter-sw.js file
(const nitterInstances) when updating this list:
*/
const redirects = [
"https://nitter.net",
"https://nitter.snopyta.org",
"https://nitter.42l.fr",
"https://nitter.nixnet.services",
"https://nitter.pussthecat.org",
"https://nitter.dark.fail",
"https://nitter.tedomum.net",
"https://nitter.cattube.org",
"https://nitter.fdn.fr",
"https://nitter.1d4.us",
"https://nitter.kavin.rocks",
"https://tweet.lambda.dance",
"https://nitter.cc",
"https://nitter.vxempire.xyz",
"https://nitter.unixfox.eu",
"https://bird.trom.tf",
"http://3nzoldnxplag42gqjs23xvghtzf6t6yzssrtytnntc6ppc7xxuoneoad.onion",
"http://nitter.l4qlywnpwqsluw65ts7md3khrivpirse744un3x7mlskqauz5pyuzgqd.onion",
"http://nitterlgj3n5fgwesu3vxc5h67ruku33nqaoeoocae2mvlzhsu6k7fqd.onion",
"http://npf37k3mtzwxreiw52ccs5ay4e6qt2fkcs2ndieurdyn2cuzzsfyfvid.onion",
];
export default {
targets,
redirects,
};

View File

@ -0,0 +1,8 @@
const targets = /wikipedia.org/;
const redirects = ["https://wikiless.org"];
export default {
targets,
redirects,
};

View File

@ -0,0 +1,45 @@
const targets = [
"m.youtube.com",
"youtube.com",
"img.youtube.com",
"www.youtube.com",
"youtube-nocookie.com",
"www.youtube-nocookie.com",
"youtu.be",
"s.ytimg.com",
"music.youtube.com",
];
/*
Please remember to also update the manifest.json file
(content_scripts > matches, 'persist-invidious-prefs.js')
when updating this list:
*/
const redirects = [
"https://invidious.snopyta.org",
"https://invidious.xyz",
"https://invidious.kavin.rocks",
"https://tube.connect.cafe",
"https://invidious.zapashcanon.fr",
"https://invidiou.site",
"https://vid.mint.lgbt",
"https://invidious.site",
"https://yewtu.be",
"https://invidious.tube",
"https://invidious.silkky.cloud",
"https://invidious.himiko.cloud",
"https://inv.skyn3t.in",
"https://tube.incognet.io",
"https://invidious.tinfoil-hat.net",
"https://invidious.namazso.eu",
"https://vid.puffyan.us",
"https://dev.viewtube.io",
"https://invidious.048596.xyz",
"http://fz253lmuao3strwbfbmx46yu7acac2jz27iwtorgmbqlkurlclmancad.onion",
"http://c7hqkpkpemu6e7emz5b4vyz7idjgdvgaaa3dyimmeojqbgpea3xqjoid.onion",
"http://w6ijuptxiku4xpnnaetxvnkc5vqcdu7mgns2u77qefoixi63vbvnpnqd.onion",
];
export default {
targets,
redirects,
};

View File

@ -0,0 +1,35 @@
window.browser = window.browser || window.chrome;
function getMessage(tag) {
return tag.replace(/__MSG_(\w+)__/g, function (_match, v1) {
return v1 ? browser.i18n.getMessage(v1) : null;
});
}
function localisePage() {
let elements = document.querySelectorAll("[data-localise]");
for (let i in elements)
if (elements.hasOwnProperty(i)) {
let obj = elements[i];
let tag = obj.getAttribute("data-localise").toString();
let msg = getMessage(tag);
if (msg && msg !== tag) obj.textContent = msg;
}
let placeholders = document.querySelectorAll("[data-localise-placeholder]");
for (let i in placeholders)
if (placeholders.hasOwnProperty(i)) {
let obj = placeholders[i];
let tag = obj.getAttribute("data-localise-placeholder").toString();
let msg = getMessage(tag);
if (msg && msg !== tag) obj.placeholder = msg;
}
}
localisePage();

View File

@ -1,23 +1,23 @@
'use strict';
"use strict";
window.browser = window.browser || window.chrome;
function getCookie() {
let ca = document.cookie.split(';');
let ca = document.cookie.split(";");
for (let i = 0; i < ca.length; i++) {
let c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf('PREFS=') == 0) {
while (c.charAt(0) == " ") c = c.substring(1, c.length);
if (c.indexOf("PREFS=") == 0) {
return JSON.parse(
decodeURIComponent(c.substring('PREFS='.length, c.length))
)
};
decodeURIComponent(c.substring("PREFS=".length, c.length))
);
}
}
return {};
}
browser.storage.sync.get(
['alwaysProxy', 'videoQuality', 'invidiousDarkMode', 'persistInvidiousPrefs'],
["alwaysProxy", "videoQuality", "invidiousDarkMode", "persistInvidiousPrefs"],
(result) => {
if (result.persistInvidiousPrefs) {
const prefs = getCookie();
@ -27,4 +27,4 @@ browser.storage.sync.get(
document.cookie = `PREFS=${encodeURIComponent(JSON.stringify(prefs))}`;
}
}
);
);

View File

@ -0,0 +1,186 @@
"use strict";
const nitterInstances = [
"https://nitter.net",
"https://nitter.snopyta.org",
"https://nitter.42l.fr",
"https://nitter.nixnet.services",
"https://nitter.pussthecat.org",
"https://nitter.dark.fail",
"https://nitter.tedomum.net",
"https://nitter.cattube.org",
"https://nitter.fdn.fr",
"https://nitter.1d4.us",
"https://nitter.kavin.rocks",
"https://tweet.lambda.dance",
"https://nitter.cc",
"https://nitter.vxempire.xyz",
"https://nitter.unixfox.eu",
"https://bird.trom.tf"
];
let disableNitter;
let nitterInstance;
let redirectBypassFlag;
let exceptions;
window.browser = window.browser || window.chrome;
function getRandomInstance() {
return nitterInstances[~~(nitterInstances.length * Math.random())];
}
function isNotException(url) {
return !exceptions.some((regex) => regex.test(url.href));
}
function shouldRedirect(url) {
return (
!redirectBypassFlag &&
isNotException(url) &&
!disableNitter &&
url.host !== nitterInstance &&
!url.pathname.includes("/home")
);
}
function redirectTwitter(url) {
if (url.host.split(".")[0] === "pbs") {
return `${nitterInstance}/pic/${encodeURIComponent(url.href)}`;
} else if (url.host.split(".")[0] === "video") {
return `${nitterInstance}/gif/${encodeURIComponent(url.href)}`;
} else {
return `${nitterInstance}${url.pathname}${url.search}`;
}
}
browser.storage.sync.get(
[
"nitterInstance",
"disableNitter",
"removeTwitterSW",
"redirectBypassFlag",
"exceptions",
],
(result) => {
redirectBypassFlag = result.redirectBypassFlag;
browser.storage.sync.set({
redirectBypassFlag: false,
});
if (!result.removeTwitterSW) {
disableNitter = result.disableNitter;
nitterInstance = result.nitterInstance || getRandomInstance();
exceptions = result.exceptions
? result.exceptions.map((e) => {
return new RegExp(e);
})
: [];
navigator.serviceWorker.getRegistrations().then((registrations) => {
for (let registration of registrations) {
if (registration.scope === "https://twitter.com/") {
registration.unregister();
console.log("Unregistered Twitter SW", registration);
}
}
});
const url = new URL(window.location);
if (shouldRedirect(url)) {
const redirect = redirectTwitter(url);
console.info("Redirecting", `"${url.href}"`, "=>", `"${redirect}"`);
window.location = redirect;
}
}
}
);
// Keeping this here until https://bugzilla.mozilla.org/show_bug.cgi?id=1536094 is fixed...
//
//"use strict";
//
//let disableNitter;
//let nitterInstance;
//let redirectBypassFlag;
//let exceptions;
//
//window.browser = window.browser || window.chrome;
//
//Promise.all([
// import(browser.extension.getURL("src/assets/javascripts/helpers/common.js")),
// import(browser.extension.getURL("src/assets/javascripts/helpers/twitter.js")),
//]).then(
// (helpers) => {
// let commonHelper;
// let twitterHelper;
// [commonHelper, twitterHelper] = helpers;
//
// function isNotException(url) {
// return !exceptions.some((regex) => regex.test(url.href));
// }
//
// function shouldRedirect(url) {
// return (
// !redirectBypassFlag &&
// isNotException(url) &&
// !disableNitter &&
// url.host !== nitterInstance &&
// !url.pathname.includes("/home")
// );
// }
//
// function redirectTwitter(url) {
// if (url.host.split(".")[0] === "pbs") {
// return `${nitterInstance}/pic/${encodeURIComponent(url.href)}`;
// } else if (url.host.split(".")[0] === "video") {
// return `${nitterInstance}/gif/${encodeURIComponent(url.href)}`;
// } else {
// return `${nitterInstance}${url.pathname}${url.search}`;
// }
// }
//
// browser.storage.sync.get(
// [
// "nitterInstance",
// "disableNitter",
// "removeTwitterSW",
// "redirectBypassFlag",
// "exceptions",
// ],
// (result) => {
// redirectBypassFlag = result.redirectBypassFlag;
// browser.storage.sync.set({
// redirectBypassFlag: false,
// });
// if (!result.removeTwitterSW) {
// disableNitter = result.disableNitter;
// nitterInstance =
// result.nitterInstance ||
// commonHelper.default.getRandomInstance(
// twitterHelper.default.redirects
// );
// exceptions = result.exceptions
// ? result.exceptions.map((e) => {
// return new RegExp(e);
// })
// : [];
// navigator.serviceWorker.getRegistrations().then((registrations) => {
// for (let registration of registrations) {
// if (registration.scope === "https://twitter.com/") {
// registration.unregister();
// console.log("Unregistered Twitter SW", registration);
// }
// }
// });
// const url = new URL(window.location);
// if (shouldRedirect(url)) {
// const redirect = redirectTwitter(url);
// console.info("Redirecting", `"${url.href}"`, "=>", `"${redirect}"`);
// window.location = redirect;
// }
// }
// }
// );
// },
// (error) => {
// console.error(error);
// }
//);

View File

@ -23,7 +23,7 @@ body.light-theme {
body {
margin: 0;
max-width: 400px;
width: 400px;
margin: auto;
min-height: 572px;
font-family: Sans-Serif;
@ -235,6 +235,10 @@ input:invalid {
.tab {
overflow: hidden;
background-color: var(--bg-secondary);
position: fixed;
top: 0;
width: 400px;
z-index: 2;
}
.tab button {
@ -262,7 +266,7 @@ input:invalid {
}
.tabcontent {
padding-top: 10px;
padding-top: 50px;
display: none;
background-color: var(--bg-main);
min-height: 510px;
@ -330,7 +334,7 @@ li {
}
.autocomplete input {
background: url(../assets/images/chevron-down.svg) right no-repeat;
background: url(../images/chevron-down.svg) right no-repeat;
}
.autocomplete-items {
@ -461,3 +465,74 @@ input[type="range"]::-moz-range-thumb {
#volume-value {
float: right;
}
.collapsible {
background-color: var(--bg-main);
cursor: pointer;
color: var(--active);
padding: 18px;
width: 100%;
border: none;
text-align: left;
outline: none;
font-size: 15px;
border-bottom: solid var(--active);
font-weight: bold;
}
.collapsible:after {
content: "\25BE";
color: var(--active);
font-weight: bold;
float: right;
margin-left: 5px;
}
.collapsible-active,
.collapsible:hover,
.collapsible:hover::after {
background-color: var(--active);
color: var(--text-secondary);
}
.collapsible-active:after {
content: "\25B4";
color: var(--text-secondary);
font-weight: bold;
float: right;
margin-left: 5px;
}
.collapsible-content {
padding: 0 18px;
display: none;
overflow: hidden;
}
hr {
height: 2px;
background-color: var(--active);
border: none;
}
.new-badge {
position: relative;
}
.new-badge[data-new-badge]:after {
content: "New!";
position: absolute;
top: -10px;
right: -42px;
font-size: 0.9em;
background: var(--active);
color: white;
width: 35px;
height: 18px;
text-align: center;
line-height: 18px;
border-radius: 25px;
padding: 2px;
box-shadow: 0 0 1px var(--bg-secondary);
font-weight: bold;
}

View File

@ -1,10 +1,10 @@
{
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"version": "1.1.41",
"version": "1.1.49",
"manifest_version": 2,
"background": {
"scripts": ["background.js"],
"page": "pages/background/background.html",
"persistent": true
},
"default_locale": "en",
@ -34,32 +34,35 @@
"*://pbs.twimg.com/*",
"*://video.twimg.com/*"
],
"js": ["assets/javascript/remove-twitter-sw.js"],
"js": ["assets/javascripts/remove-twitter-sw.js"],
"run_at": "document_start"
},
{
"matches": [
"*://invidious.snopyta.org/*",
"*://yewtu.be/*",
"*://invidious.xyz/*",
"*://invidious.site/*",
"*://invidious.kavin.rocks/*",
"*://tube.connect.cafe/*",
"*://invidious.zapashcanon.fr/*",
"*://invidiou.site/*",
"*://invidious.ggc-project.de/*",
"*://invidious.13ad.de/*",
"*://invidious.toot.koeln/*",
"*://invidious.fdn.fr/*",
"*://watch.nettohikari.com/*",
"*://yt.iswleuven.be/*",
"*://yt.maisputain.ovh/*",
"*://kgg2m7yk5aybusll.onion/*",
"*://axqzx4s6s54s32yentfqojs3x5i7faxza6xo3ehd4bzzsg2ii4fv2iid.onion/*",
"*://vid.mint.lgbt/*",
"*://invidious.site/*",
"*://yewtu.be/*",
"*://invidious.tube/*",
"*://invidious.silkky.cloud/*",
"*://invidious.himiko.cloud/*",
"*://inv.skyn3t.in/*",
"*://tube.incognet.io/*",
"*://invidious.tinfoil-hat.net/*",
"*://invidious.namazso.eu/*",
"*://vid.puffyan.us/*",
"*://dev.viewtube.io/*",
"*://invidious.048596.xyz/*",
"*://fz253lmuao3strwbfbmx46yu7acac2jz27iwtorgmbqlkurlclmancad.onion/*",
"*://qklhadlycap4cnod.onion/*",
"*://c7hqkpkpemu6e7emz5b4vyz7idjgdvgaaa3dyimmeojqbgpea3xqjoid.onion/*",
"*://mfqczy4mysscub2s.onion/*",
"*://4l2dgddgsrkf2ous66i6seeyi6etzfgrue332grh2n7madpwopotugyd.onion/*"
"*://w6ijuptxiku4xpnnaetxvnkc5vqcdu7mgns2u77qefoixi63vbvnpnqd.onion/*"
],
"js": ["assets/javascript/persist-invidious-prefs.js"],
"js": ["assets/javascripts/persist-invidious-prefs.js"],
"run_at": "document_start"
}
],
@ -67,9 +70,11 @@
"page": "pages/options/options.html",
"open_in_tab": false
},
"web_accessible_resources": ["assets/javascripts/helpers/*"],
"browser_specific_settings": {
"gecko": {
"id": "{b7f9d2cd-d772-4302-8c3f-eb941af36f76}"
"id": "{b7f9d2cd-d772-4302-8c3f-eb941af36f76}",
"strict_min_version": "67.0"
}
}
}

View File

@ -0,0 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script type="module" src="background.js"></script>
</head>
</html>

View File

@ -0,0 +1,682 @@
"use strict";
import commonHelper from "../../assets/javascripts/helpers/common.js";
import twitterHelper from "../../assets/javascripts/helpers/twitter.js";
import youtubeHelper from "../../assets/javascripts/helpers/youtube.js";
import instagramHelper from "../../assets/javascripts/helpers/instagram.js";
import mapsHelper from "../../assets/javascripts/helpers/google-maps.js";
import redditHelper from "../../assets/javascripts/helpers/reddit.js";
import searchHelper from "../../assets/javascripts/helpers/google-search.js";
import googleTranslateHelper from "../../assets/javascripts/helpers/google-translate.js";
import wikipediaHelper from "../../assets/javascripts/helpers/wikipedia.js";
const nitterInstances = twitterHelper.redirects;
const twitterDomains = twitterHelper.targets;
const youtubeDomains = youtubeHelper.targets;
const invidiousInstances = youtubeHelper.redirects;
const instagramDomains = instagramHelper.targets;
const bibliogramInstances = instagramHelper.redirects;
const instagramReservedPaths = instagramHelper.reservedPaths;
const bibliogramBypassPaths = instagramHelper.bypassPaths;
const osmDefault = mapsHelper.redirects[0];
const googleMapsRegex = mapsHelper.targets;
const mapCentreRegex = mapsHelper.mapCentreRegex;
const dataLatLngRegex = mapsHelper.dataLatLngRegex;
const placeRegex = mapsHelper.placeRegex;
const travelModes = mapsHelper.travelModes;
const layers = mapsHelper.layers;
const redditInstances = redditHelper.redirects;
const redditDomains = redditHelper.targets;
const redditBypassPaths = redditHelper.bypassPaths;
const redditDefault = redditHelper.redirects[0];
const googleSearchRegex = searchHelper.targets;
const searchEngineInstances = searchHelper.redirects;
const simplyTranslateInstances = googleTranslateHelper.redirects;
const simplyTranslateDefault = simplyTranslateInstances[0];
const googleTranslateDomains = googleTranslateHelper.targets;
const wikipediaInstances = wikipediaHelper.redirects;
const wikipediaDefault = wikipediaInstances[0];
const wikipediaRegex = wikipediaHelper.targets;
let disableNitter;
let disableInvidious;
let disableBibliogram;
let disableOsm;
let disableReddit;
let disableSearchEngine;
let disableSimplyTranslate;
let disableWikipedia;
let nitterInstance;
let invidiousInstance;
let bibliogramInstance;
let osmInstance;
let redditInstance;
let searchEngineInstance;
let simplyTranslateInstance;
let wikipediaInstance;
let alwaysProxy;
let onlyEmbeddedVideo;
let videoQuality;
let invidiousDarkMode;
let invidiousVolume;
let invidiousPlayerStyle;
let invidiousSubtitles;
let invidiousAutoplay;
let useFreeTube;
let nitterRandomPool;
let invidiousRandomPool;
let bibliogramRandomPool;
let exceptions;
window.browser = window.browser || window.chrome;
browser.storage.sync.get(
[
"nitterInstance",
"invidiousInstance",
"bibliogramInstance",
"osmInstance",
"redditInstance",
"searchEngineInstance",
"simplyTranslateInstance",
"wikipediaInstance",
"disableNitter",
"disableInvidious",
"disableBibliogram",
"disableOsm",
"disableReddit",
"disableSearchEngine",
"disableSimplyTranslate",
"disableWikipedia",
"alwaysProxy",
"onlyEmbeddedVideo",
"videoQuality",
"invidiousDarkMode",
"invidiousVolume",
"invidiousPlayerStyle",
"invidiousSubtitles",
"invidiousAutoplay",
"useFreeTube",
"nitterRandomPool",
"invidiousRandomPool",
"bibliogramRandomPool",
"exceptions",
],
(result) => {
nitterInstance = result.nitterInstance;
invidiousInstance = result.invidiousInstance;
bibliogramInstance = result.bibliogramInstance;
osmInstance = result.osmInstance || osmDefault;
redditInstance = result.redditInstance || redditDefault;
searchEngineInstance = result.searchEngineInstance;
simplyTranslateInstance =
result.simplyTranslateInstance || simplyTranslateDefault;
wikipediaInstance = result.wikipediaInstance || wikipediaDefault;
disableNitter = result.disableNitter;
disableInvidious = result.disableInvidious;
disableBibliogram = result.disableBibliogram;
disableOsm = result.disableOsm;
disableReddit = result.disableReddit;
disableSearchEngine = result.disableSearchEngine;
disableWikipedia = result.disableWikipedia;
disableSimplyTranslate = result.disableSimplyTranslate;
alwaysProxy = result.alwaysProxy;
onlyEmbeddedVideo = result.onlyEmbeddedVideo;
videoQuality = result.videoQuality;
invidiousDarkMode = result.invidiousDarkMode;
exceptions = result.exceptions
? result.exceptions.map((e) => {
return new RegExp(e);
})
: [];
invidiousVolume = result.invidiousVolume;
invidiousPlayerStyle = result.invidiousPlayerStyle;
invidiousSubtitles = result.invidiousSubtitles || "";
invidiousAutoplay = result.invidiousAutoplay;
useFreeTube = result.useFreeTube;
nitterRandomPool = result.nitterRandomPool
? result.nitterRandomPool.split(",")
: commonHelper.filterInstances(nitterInstances);
invidiousRandomPool = result.invidiousRandomPool
? result.invidiousRandomPool.split(",")
: commonHelper.filterInstances(invidiousInstances);
bibliogramRandomPool = result.bibliogramRandomPool
? result.bibliogramRandomPool.split(",")
: commonHelper.filterInstances(bibliogramInstances);
}
);
browser.storage.onChanged.addListener((changes) => {
if ("nitterInstance" in changes) {
nitterInstance = changes.nitterInstance.newValue;
}
if ("invidiousInstance" in changes) {
invidiousInstance = changes.invidiousInstance.newValue;
}
if ("bibliogramInstance" in changes) {
bibliogramInstance = changes.bibliogramInstance.newValue;
}
if ("osmInstance" in changes) {
osmInstance = changes.osmInstance.newValue || osmDefault;
}
if ("simplyTranslateInstance" in changes) {
simplyTranslateInstance =
changes.simplyTranslateInstance.newValue || simplyTranslateDefault;
}
if ("wikipediaInstance" in changes) {
wikipediaInstance = changes.wikipediaInstance.newValue || wikipediaDefault;
}
if ("redditInstance" in changes) {
redditInstance = changes.redditInstance.newValue || redditDefault;
}
if ("searchEngineInstance" in changes) {
searchEngineInstance = changes.searchEngineInstance.newValue;
}
if ("disableNitter" in changes) {
disableNitter = changes.disableNitter.newValue;
}
if ("disableInvidious" in changes) {
disableInvidious = changes.disableInvidious.newValue;
}
if ("disableBibliogram" in changes) {
disableBibliogram = changes.disableBibliogram.newValue;
}
if ("disableOsm" in changes) {
disableOsm = changes.disableOsm.newValue;
}
if ("disableReddit" in changes) {
disableReddit = changes.disableReddit.newValue;
}
if ("disableSearchEngine" in changes) {
disableSearchEngine = changes.disableSearchEngine.newValue;
}
if ("disableSimplyTranslate" in changes) {
disableSimplyTranslate = changes.disableSimplyTranslate.newValue;
}
if ("disableWikipedia" in changes) {
disableWikipedia = changes.disableWikipedia.newValue;
}
if ("alwaysProxy" in changes) {
alwaysProxy = changes.alwaysProxy.newValue;
}
if ("onlyEmbeddedVideo" in changes) {
onlyEmbeddedVideo = changes.onlyEmbeddedVideo.newValue;
}
if ("videoQuality" in changes) {
videoQuality = changes.videoQuality.newValue;
}
if ("invidiousDarkMode" in changes) {
invidiousDarkMode = changes.invidiousDarkMode.newValue;
}
if ("invidiousVolume" in changes) {
invidiousVolume = changes.invidiousVolume.newValue;
}
if ("invidiousPlayerStyle" in changes) {
invidiousPlayerStyle = changes.invidiousPlayerStyle.newValue;
}
if ("invidiousSubtitles" in changes) {
invidiousSubtitles = changes.invidiousSubtitles.newValue;
}
if ("invidiousAutoplay" in changes) {
invidiousAutoplay = changes.invidiousAutoplay.newValue;
}
if ("useFreeTube" in changes) {
useFreeTube = changes.useFreeTube.newValue;
}
if ("nitterRandomPool" in changes) {
nitterRandomPool = changes.nitterRandomPool.newValue.split(",");
}
if ("invidiousRandomPool" in changes) {
invidiousRandomPool = changes.invidiousRandomPool.newValue.split(",");
}
if ("bibliogramRandomPool" in changes) {
bibliogramRandomPool = changes.bibliogramRandomPool.newValue.split(",");
}
if ("exceptions" in changes) {
exceptions = changes.exceptions.newValue.map((e) => {
return new RegExp(e);
});
}
});
function isException(url, initiator) {
return (
exceptions.some((regex) => regex.test(url.href)) ||
(initiator && exceptions.some((regex) => regex.test(initiator.href)))
);
}
function isFirefox() {
return typeof InstallTrigger !== "undefined";
}
function redirectYouTube(url, initiator, type) {
if (disableInvidious || isException(url, initiator)) {
return null;
}
if (
initiator &&
(initiator.origin === invidiousInstance ||
invidiousInstances.includes(initiator.origin) ||
youtubeDomains.includes(initiator.host))
) {
return null;
}
if (url.pathname.match(/iframe_api/) || url.pathname.match(/www-widgetapi/)) {
// Don't redirect YouTube Player API.
return null;
}
if (url.host.split(".")[0] === "studio") {
// Avoid redirecting `studio.youtube.com`
return null;
}
if (onlyEmbeddedVideo && type !== "sub_frame") {
return null;
}
if (useFreeTube && type === "main_frame") {
return `freetube://${url}`;
}
// Apply settings
if (alwaysProxy) {
url.searchParams.append("local", true);
}
if (videoQuality) {
url.searchParams.append("quality", videoQuality);
}
if (invidiousDarkMode) {
url.searchParams.append("dark_mode", invidiousDarkMode);
}
if (invidiousVolume) {
url.searchParams.append("volume", invidiousVolume);
}
if (invidiousPlayerStyle) {
url.searchParams.append("player_style", invidiousPlayerStyle);
}
if (invidiousSubtitles) {
url.searchParams.append("subtitles", invidiousSubtitles);
}
if (invidiousAutoplay) {
url.searchParams.append("autoplay", 1);
}
return `${
invidiousInstance || commonHelper.getRandomInstance(invidiousRandomPool)
}${url.pathname.replace("/shorts", "")}${url.search}`;
}
function redirectTwitter(url, initiator) {
if (disableNitter || isException(url, initiator)) {
return null;
}
if (url.pathname.split("/").includes("home")) {
return null;
}
if (
isFirefox() &&
initiator &&
(initiator.origin === nitterInstance ||
nitterInstances.includes(initiator.origin) ||
twitterDomains.includes(initiator.host))
) {
browser.storage.sync.set({
redirectBypassFlag: true,
});
return null;
}
if (url.host.split(".")[0] === "pbs" || url.host.split(".")[0] === "video") {
return `${
nitterInstance || commonHelper.getRandomInstance(nitterRandomPool)
}/pic/${encodeURIComponent(url.href)}`;
} else if (url.pathname.split("/").includes("tweets")) {
return `${
nitterInstance || commonHelper.getRandomInstance(nitterRandomPool)
}${url.pathname.replace("/tweets", "")}${url.search}`;
} else {
return `${
nitterInstance || commonHelper.getRandomInstance(nitterRandomPool)
}${url.pathname}${url.search}`;
}
}
function redirectInstagram(url, initiator, type) {
if (disableBibliogram || isException(url, initiator)) {
return null;
}
// Do not redirect Bibliogram view on Instagram links
if (
initiator &&
(initiator.origin === bibliogramInstance ||
bibliogramInstances.includes(initiator.origin) ||
instagramDomains.includes(initiator.host))
) {
return null;
}
// Do not redirect /accounts, /embeds.js, or anything other than main_frame
if (type !== "main_frame" || url.pathname.match(bibliogramBypassPaths)) {
return null;
}
if (
url.pathname === "/" ||
instagramReservedPaths.includes(url.pathname.split("/")[1])
) {
return `${
bibliogramInstance || commonHelper.getRandomInstance(bibliogramRandomPool)
}${url.pathname}${url.search}`;
} else {
// Likely a user profile, redirect to '/u/...'
return `${
bibliogramInstance || commonHelper.getRandomInstance(bibliogramRandomPool)
}/u${url.pathname}${url.search}`;
}
}
function redirectGoogleMaps(url, initiator) {
if (disableOsm || isException(url, initiator)) {
return null;
}
if (initiator.host === "earth.google.com") {
return null;
}
let redirect;
let mapCentre = "";
let params = "";
// Set map centre if present
if (url.pathname.match(mapCentreRegex)) {
const [, lat, lon, zoom] = url.pathname.match(mapCentreRegex);
mapCentre = `#map=${zoom}/${lat}/${lon}`;
} else if (url.search.includes("center=")) {
const [lat, lon] = url.searchParams.get("center").split(",");
mapCentre = `#map=${url.searchParams.get("zoom") || "17"}/${lat}/${lon}`;
// Set default zoom if mapCentre not present
} else {
params = "&zoom=17";
}
// Set map layer
params = `${params}&layers=${
layers[url.searchParams.get("layer")] || layers["none"]
}`;
// Handle Google Maps Embed API
if (url.pathname.split("/").includes("embed")) {
let query = "";
if (url.searchParams.has("q")) {
query = url.searchParams.get("q");
} else if (url.searchParams.has("query")) {
query = url.searchParams.has("query");
} else if (url.searchParams.has("pb")) {
try {
query = url.searchParams.get("pb").split(/!2s(.*?)!/)[1];
} catch (error) {
console.error(error);
// Unable to find map marker in URL.
}
}
let marker, bbox;
mapsHelper.addressToLatLng(query, (coords, boundingbox) => {
marker = coords;
bbox = boundingbox;
});
redirect = `${osmInstance}/export/embed.html?bbox=${bbox}&layer=mapnik&marker=${marker}`;
// Handle Google Maps Directions
} else if (url.pathname.split("/").includes("dir")) {
const travelMode =
travelModes[url.searchParams.get("travelmode")] || travelModes["driving"];
let origin;
mapsHelper.addressToLatLng(url.searchParams.get("origin"), (coords) => {
origin = coords;
});
let destination;
mapsHelper.addressToLatLng(
url.searchParams.get("destination"),
(coords) => {
destination = coords;
}
);
redirect = `${osmInstance}/directions?engine=${travelMode}&route=${origin}%3B${destination}${mapCentre}${params}`;
// Get marker from data attribute
} else if (
url.pathname.includes("data=") &&
url.pathname.match(dataLatLngRegex)
) {
const [mlat, mlon] = url.pathname.match(dataLatLngRegex);
redirect = `${osmInstance}/?mlat=${mlat.replace(
"!3d",
""
)}&mlon=${mlon.replace("!4d", "")}${mapCentre}${params}`;
// Get marker from ll param
} else if (url.searchParams.has("ll")) {
const [mlat, mlon] = url.searchParams.get("ll").split(",");
redirect = `${osmInstance}/?mlat=${mlat}&mlon=${mlon}${mapCentre}${params}`;
// Get marker from viewpoint param.
} else if (url.searchParams.has("viewpoint")) {
const [mlat, mlon] = url.searchParams.get("viewpoint").split(",");
redirect = `${osmInstance}/?mlat=${mlat}&mlon=${mlon}${mapCentre}${params}`;
// Use query as search if present.
} else {
let query;
if (url.searchParams.has("q")) {
query = url.searchParams.get("q");
} else if (url.searchParams.has("query")) {
query = url.searchParams.get("query");
} else if (url.pathname.match(placeRegex)) {
query = url.pathname.match(placeRegex)[1];
}
redirect = `${osmInstance}/${query ? "search?query=" + query : ""}${
mapCentre || "#"
}${params}`;
}
return redirect;
}
function redirectReddit(url, initiator, type) {
if (disableReddit || isException(url, initiator)) {
return null;
}
// Do not redirect when already on the selected view
if (
(initiator && initiator.origin === redditInstance) ||
url.origin === redditInstance
) {
return null;
}
// Do not redirect exclusions nor anything other than main_frame
if (type !== "main_frame" || url.pathname.match(redditBypassPaths)) {
return null;
}
if (url.host === "i.redd.it") {
if (redditInstance.includes("libredd")) {
return `${redditInstance}/img${url.pathname}${url.search}`;
} else if (redditInstance.includes("teddit")) {
// As of 2021-04-09, redirects for teddit images are nontrivial:
// - navigating to the image before ever navigating to its page causes
// 404 error (probably needs fix on teddit project)
// - some image links on teddit are very different
// Therefore, don't support redirecting image links for teddit.
return null;
} else {
return null;
}
} else if (url.host === "redd.it") {
if (
redditInstance.includes("teddit") &&
!url.pathname.match(/^\/+[^\/]+\/+[^\/]/)
) {
// As of 2021-04-22, redirects for teddit redd.it/foo links don't work.
// It appears that adding "/comments" as a prefix works, so manually add
// that prefix if it is missing. Even though redd.it/comments/foo links
// don't seem to work or exist, guard against affecting those kinds of
// paths.
//
// Note the difference between redd.it/comments/foo (doesn't work) and
// teddit.net/comments/foo (works).
return `${redditInstance}/comments${url.pathname}${url.search}`;
}
}
return `${redditInstance}${url.pathname}${url.search}`;
}
function redirectSearchEngine(url, initiator) {
if (disableSearchEngine || isException(url, initiator)) {
return null;
}
const searchEngine =
searchEngineInstance ||
commonHelper.getRandomInstance(searchEngineInstances);
let search = "";
url.search
.slice(1)
.split("&")
.forEach(function (input) {
if (input.startsWith("q=")) search = input;
});
return `${searchEngine.link}${searchEngine.q}?${search}`;
}
function redirectGoogleTranslate(url, initiator) {
if (disableSimplyTranslate || isException(url, initiator)) {
return null;
}
return `${simplyTranslateInstance}/${url.search}`;
}
function redirectWikipedia(url, initiator) {
if (disableWikipedia || isException(url, initiator)) {
return null;
}
let GETArguments = [];
if (url.search.length > 0) {
let search = url.search.substring(1); //get rid of '?'
let argstrings = search.split("&");
for (let i = 0; i < argstrings.length; i++) {
let args = argstrings[i].split("=");
GETArguments.push([args[0], args[1]]);
}
}
let link = `${wikipediaInstance}${url.pathname}`;
let urlSplit = url.host.split(".");
if (urlSplit[0] != "wikipedia" && urlSplit[0] != "www") {
if (urlSplit[0] == "m")
GETArguments.push(["mobileaction", "toggle_view_mobile"]);
else GETArguments.push(["lang", urlSplit[0]]);
if (urlSplit[1] == "m")
GETArguments.push(["mobileaction", "toggle_view_mobile"]);
//wikiless doesn't have mobile view support yet
}
for (let i = 0; i < GETArguments.length; i++) {
link +=
(i == 0 ? "?" : "&") + GETArguments[i][0] + "=" + GETArguments[i][1];
}
if (
urlSplit[urlSplit.length - 1] == "org" &&
urlSplit[urlSplit.length - 2] == "wikipedia"
)
//just in case someone wanted to visit wikipedia.org.foo.bar.net
return link;
else return null;
}
browser.webRequest.onBeforeRequest.addListener(
(details) => {
const url = new URL(details.url);
let initiator;
if (details.originUrl) {
initiator = new URL(details.originUrl);
} else if (details.initiator) {
initiator = new URL(details.initiator);
}
let redirect;
if (youtubeDomains.includes(url.host)) {
redirect = {
redirectUrl: redirectYouTube(url, initiator, details.type),
};
} else if (twitterDomains.includes(url.host)) {
redirect = {
redirectUrl: redirectTwitter(url, initiator),
};
} else if (instagramDomains.includes(url.host)) {
redirect = {
redirectUrl: redirectInstagram(url, initiator, details.type),
};
} else if (url.href.match(googleMapsRegex)) {
redirect = {
redirectUrl: redirectGoogleMaps(url, initiator),
};
} else if (redditDomains.includes(url.host)) {
redirect = {
redirectUrl: redirectReddit(url, initiator, details.type),
};
} else if (url.href.match(googleSearchRegex)) {
redirect = {
redirectUrl: redirectSearchEngine(url, initiator),
};
} else if (googleTranslateDomains.includes(url.host)) {
redirect = {
redirectUrl: redirectGoogleTranslate(url, initiator),
};
} else if (url.host.match(wikipediaRegex)) {
redirect = {
redirectUrl: redirectWikipedia(url, initiator),
};
}
if (redirect && redirect.redirectUrl) {
console.info(
"Redirecting",
`"${url.href}"`,
"=>",
`"${redirect.redirectUrl}"`
);
console.info("Details", details);
}
return redirect;
},
{
urls: ["<all_urls>"],
},
["blocking"]
);
browser.runtime.onInstalled.addListener((details) => {
browser.storage.sync.get(
["disableSearchEngine", "disableSimplyTranslate", "disableWikipedia"],
(result) => {
if (result.disableSearchEngine === undefined) {
browser.storage.sync.set({
disableSearchEngine: true,
});
}
if (result.disableSimplyTranslate === undefined) {
browser.storage.sync.set({
disableSimplyTranslate: true,
});
}
if (result.disableWikipedia === undefined) {
browser.storage.sync.set({
disableWikipedia: true,
});
}
}
);
if (details.reason === "update") {
browser.storage.sync.get(
["whitelist", "exceptions", "invidiousInstance", "disableSearchEngine"],
(result) => {
if (result.whitelist) {
let whitelist = result.whitelist.map((e) =>
e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&")
);
browser.storage.sync.set({
exceptions: result.exceptions.concat(whitelist),
whitelist: null,
});
}
if (result.invidiousInstance === "https://invidio.us") {
browser.storage.sync.set({
invidiousInstance: null,
});
}
}
);
}
});

View File

@ -0,0 +1,647 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title></title>
<link href="../../assets/stylesheets/styles.css" rel="stylesheet" />
<title>Privacy Redirect Options</title>
</head>
<body>
<div class="tab">
<button
class="tablinks"
id="general-tab"
data-localise="__MSG_generalTab__"
>
General
</button>
<button
class="tablinks"
id="advanced-tab"
data-localise="__MSG_advancedTab__"
>
Advanced
</button>
<button
class="tablinks"
id="exceptions-tab"
data-localise="__MSG_exceptionsTab__"
>
Exceptions
</button>
</div>
<div id="general" class="tabcontent">
<section class="settings-block">
<table class="option" aria-label="Toggle Nitter redirects">
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_disableNitter__">Nitter Redirects</h1>
</td>
<td>
<input
aria-hidden="true"
id="disable-nitter"
type="checkbox"
checked
/>&nbsp;
<label for="disable-nitter" class="checkbox-label"></label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<table class="option" aria-label="Toggle Invidious redirects">
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_disableInvidious__">
Invidious Redirects
</h1>
</td>
<td>
<input
aria-hidden="true"
id="disable-invidious"
type="checkbox"
checked
/>&nbsp;
<label for="disable-invidious" class="checkbox-label"> </label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<table class="option" aria-label="Toggle Bibliogram redirects">
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_disableBibliogram__">
Bibliogram Redirects
</h1>
</td>
<td>
<input
aria-hidden="true"
id="disable-bibliogram"
type="checkbox"
checked
/>&nbsp;
<label for="disable-bibliogram" class="checkbox-label"> </label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<table class="option" aria-label="Toggle OpenStreetMap redirects">
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_disableOsm__">
OpenStreetMap Redirects
</h1>
</td>
<td>
<input
aria-hidden="true"
id="disable-osm"
type="checkbox"
checked
/>&nbsp;
<label for="disable-osm" class="checkbox-label"> </label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<table class="option" aria-label="Toggle Reddit redirects">
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_disableReddit__">
Reddit Redirects
</h1>
</td>
<td>
<input
aria-hidden="true"
id="disable-reddit"
type="checkbox"
checked
/>&nbsp;
<label for="disable-reddit" class="checkbox-label"> </label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<table class="option" aria-label="Toggle Search Engine redirects">
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_disableSearchEngine__">
Search Engine Redirects
</h1>
</td>
<td>
<input
aria-hidden="true"
id="disable-search-engine"
type="checkbox"
checked
/>&nbsp;
<label for="disable-search-engine" class="checkbox-label"> </label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<table class="option" aria-label="Toggle SimplyTranslate redirects">
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_disableSimplyTranslate__">SimplyTranslate Redirects</h1>
</td>
<td>
<input
aria-hidden="true"
id="disable-simply-translate"
type="checkbox"
/>&nbsp;
<label for="disable-simply-translate" class="checkbox-label"></label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<table class="option" aria-label="Toggle Wikipedia redirects">
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_disableWikipedia__" class="new-badge" data-new-badge>Wikipedia Redirects</h1>
</td>
<td>
<input
aria-hidden="true"
id="disable-wikipedia"
type="checkbox"
/>&nbsp;
<label for="disable-wikipedia" class="checkbox-label"></label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_nitterInstance__">Nitter Instance</h1>
<div class="autocomplete">
<input
id="nitter-instance"
type="url"
name="nitter-instance"
data-localise-placeholder="__MSG_randomInstancePlaceholder__"
placeholder="Random instance (none selected)"
/>
</div>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_invidiousInstance__">Invidious Instance</h1>
<div class="autocomplete">
<input
id="invidious-instance"
type="url"
data-localise-placeholder="__MSG_randomInstancePlaceholder__"
placeholder="Random instance (none selected)"
/>
</div>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_bibliogramInstance__">Bibliogram Instance</h1>
<div class="autocomplete">
<input
id="bibliogram-instance"
type="url"
data-localise-placeholder="__MSG_randomInstancePlaceholder__"
placeholder="Random instance (none selected)"
/>
</div>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_osmInstance__">OpenStreetMap Instance</h1>
<div class="autocomplete">
<input
id="osm-instance"
type="url"
placeholder="https://openstreetmap.org"
/>
</div>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_redditInstance__">Reddit Instance</h1>
<div class="autocomplete">
<input
id="reddit-instance"
type="url"
placeholder="https://libredd.it"
/>
</div>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_searchEngineInstance__">Search Engine Instance</h1>
<div class="autocomplete">
<input
id="search-engine-instance"
type="url"
data-localise-placeholder="__MSG_randomInstancePlaceholder__"
placeholder="Random instance (none selected)"
/>
</div>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_simplyTranslateInstance__">SimplyTranslate Instance</h1>
<div class="autocomplete">
<input
id="simply-translate-instance"
type="url"
placeholder="https://translate.metalune.xyz"
/>
</div>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_wikipediaInstance__">Wikipedia Instance</h1>
<div class="autocomplete">
<input
id="wikipedia-instance"
type="url"
placeholder="https://wikiless.org"
/>
</div>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_theme__">Theme</h1>
<select id="theme">
<option value="">System</option>
<option value="light-theme">Light</option>
<option value="dark-theme">Dark</option>
</select>
</section>
</div>
<div id="advanced" class="tabcontent">
<button type="button" class="collapsible">
Invidious
</button>
<div class="collapsible-content">
<section class="settings-block">
<h1 data-localise="__MSG_invidiousRandomPool__">
Invidious random instance pool (comma-separated)
</h1>
<input
id="invidious-random-pool"
name="invidious-random-pool"
type="text"
/>
</section>
<section class="settings-block">
<table
class="option"
aria-label="Redirect YouTube to FreeTube where possible"
>
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_useFreeTube__">
Use FreeTube over Invidious when possible
</h1>
</td>
<td>
<input
aria-hidden="true"
id="use-freetube"
type="checkbox"
checked
/>&nbsp;
<label for="use-freetube" class="checkbox-label"> </label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<table
class="option"
aria-label="Always proxy videos through Invidious"
>
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_alwaysProxy__">
Always proxy videos through Invidious
</h1>
</td>
<td>
<input
aria-hidden="true"
id="always-proxy"
type="checkbox"
checked
/>&nbsp;
<label for="always-proxy" class="checkbox-label"> </label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<table
class="option"
aria-label="Only redirect embedded video to Invidious"
>
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_onlyEmbeddedVideo__">
Only redirect embedded video to Invidious
</h1>
</td>
<td>
<input
aria-hidden="true"
id="only-embed"
type="checkbox"
checked
/>&nbsp;
<label for="only-embed" class="checkbox-label"> </label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_videoQuality__">Invidious Video Quality</h1>
<select id="video-quality">
<option value="">Default</option>
<option value="hd720">720p</option>
<option value="medium">480p</option>
<option value="dash">DASH (Dynamic Adaptive Streaming over HTTP)</option>
</option>
</select>
</section>
<section class="settings-block">
<table class="option" aria-label="Invidious dark mode aways on">
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_invidiousDarkMode__">
Invidious dark mode always on
</h1>
</td>
<td>
<input
aria-hidden="true"
id="invidious-dark-mode"
type="checkbox"
checked
/>&nbsp;
<label for="invidious-dark-mode" class="checkbox-label">
</label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_invidiousVolume__">
Invidious Volume
</h1>
<input
id="invidious-volume"
name="invidious-volume"
type="range"
min="0"
max="100"
step="1"
/><span id="volume-value"></span>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_invidiousPlayerStyle__">
Invidious Player Style
</h1>
<select id="invidious-player-style">
<option value="">Invidious</option>
<option value="youtube">YouTube</option>
</select>
</section>
<section class="settings-block">
<h1 data-localise="__MSG_invidiousSubtitles__">
Invidious Subtitles - language codes (comma-separated)
</h1>
<input
id="invidious-subtitles"
name="invidious-subtitles"
type="text"
/>
</section>
<section class="settings-block">
<table
class="option"
aria-label="Invidious automatically play video on load"
>
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_invidiousAutoplay__">
Invidious automatically play video on load
</h1>
</td>
<td>
<input
aria-hidden="true"
id="invidious-autoplay"
type="checkbox"
checked
/>&nbsp;
<label for="invidious-autoplay" class="checkbox-label"> </label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<table class="option" aria-label="Persist Invidious preferences">
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_persistInvidiousPrefs__">
Persist Invidious preferences (as cookie)
</h1>
</td>
<td>
<input
aria-hidden="true"
id="persist-invidious-prefs"
type="checkbox"
checked
/>&nbsp;
<label for="persist-invidious-prefs" class="checkbox-label">
</label>
</td>
</tr>
</tbody>
</table>
</section>
<hr>
</div>
<button type="button" class="collapsible">
Nitter
</button>
<div class="collapsible-content">
<section class="settings-block">
<h1 data-localise="__MSG_nitterRandomPool__">
Nitter random instance pool (comma-separated)
</h1>
<input
id="nitter-random-pool"
name="nitter-random-pool"
type="text"
/>
</section>
<section class="settings-block">
<table
class="option"
aria-label="Proactively remove Twitter service worker"
>
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_removeTwitterSW__">
Proactively remove Twitter service worker
</h1>
</td>
<td>
<input
aria-hidden="true"
id="remove-twitter-sw"
type="checkbox"
checked
/>&nbsp;
<label for="remove-twitter-sw" class="checkbox-label"> </label>
</td>
</tr>
</tbody>
</table>
</section>
<hr>
</div>
<button type="button" class="collapsible">
Bibliogram
</button>
<div class="collapsible-content">
<section class="settings-block">
<h1 data-localise="__MSG_bibliogramRandomPool__">
Bibliogram random instance pool (comma-separated)
</h1>
<input
id="bibliogram-random-pool"
name="bibliogram-random-pool"
type="text"
/>
</section>
<hr>
</div>
</div>
<div id="exceptions" class="tabcontent">
<section class="settings-block">
<p data-localise="__MSG_exceptionsDescriptionP1__">
Enter a URL or Regular Expression to be excluded from redirects.
</p>
<p data-localise="__MSG_exceptionsDescriptionP2__">
All requests for or initiating from a URL that matches your exception
will be excluded from redirects.
</p>
<p data-localise="__MSG_exceptionsDescriptionP3__">
Note - Supports JavaScript regular expressions, excluding the
enclosing forward slashes.
</p>
</section>
<section class="settings-block">
<table class="exceptions option">
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_addException__">Add Exception</h1>
</td>
</tr>
<tr>
<td>
<input
id="new-exceptions-item"
type="text"
placeholder="URL or RegExp"
/>
</td>
<td>
<input type="radio" id="url" name="type" value="URL" checked />
<label class="radio" for="url">URL</label>
<input type="radio" id="regExp" name="type" value="RegExp" />
<label class="radio" for="regExp">RegExp</label>
</td>
<td>
<button id="add-to-exceptions">
<svg
xmlns="http://www.w3.org/2000/svg"
width="512"
height="512"
viewBox="0 0 512 512"
>
<line
x1="256"
y1="112"
x2="256"
y2="400"
style="
fill: none;
stroke: #fff;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 32px;
"
/>
<line
x1="400"
y1="256"
x2="112"
y2="256"
style="
fill: none;
stroke: #fff;
stroke-linecap: round;
stroke-linejoin: round;
stroke-width: 32px;
"
/>
</svg>
</button>
</td>
</tr>
</tbody>
</table>
</section>
<ul id="exceptions-items"></ul>
</div>
<script type="module" src="./options.js"></script>
<script src="../../assets/javascripts/localise.js"></script>
</body>
</html>

View File

@ -1,65 +1,58 @@
"use strict";
const nitterInstances = [
"https://nitter.net",
"https://nitter.snopyta.org",
"https://nitter.42l.fr",
"https://nitter.nixnet.services",
"https://nitter.13ad.de",
"https://nitter.pussthecat.org",
"https://nitter.mastodont.cat",
"https://nitter.dark.fail",
"https://nitter.tedomum.net",
"https://t.maisputain.ovh",
"http://3nzoldnxplag42gqjs23xvghtzf6t6yzssrtytnntc6ppc7xxuoneoad.onion",
"http://nitter.l4qlywnpwqsluw65ts7md3khrivpirse744un3x7mlskqauz5pyuzgqd.onion",
];
const invidiousInstances = [
"https://invidious.snopyta.org",
"https://yewtu.be",
"https://invidious.ggc-project.de",
"https://invidious.13ad.de",
"https://invidious.xyz",
"https://invidious.toot.koeln",
"https://invidious.site",
"https://invidiou.site",
"https://invidious.fdn.fr",
"https://watch.nettohikari.com",
"https://yt.iswleuven.be",
"https://yt.maisputain.ovh",
"http://kgg2m7yk5aybusll.onion",
"http://axqzx4s6s54s32yentfqojs3x5i7faxza6xo3ehd4bzzsg2ii4fv2iid.onion",
"http://fz253lmuao3strwbfbmx46yu7acac2jz27iwtorgmbqlkurlclmancad.onion",
"http://qklhadlycap4cnod.onion",
"http://c7hqkpkpemu6e7emz5b4vyz7idjgdvgaaa3dyimmeojqbgpea3xqjoid.onion",
"http://mfqczy4mysscub2s.onion",
"http://4l2dgddgsrkf2ous66i6seeyi6etzfgrue332grh2n7madpwopotugyd.onion",
];
const bibliogramInstances = [
"https://bibliogram.art",
"https://bibliogram.snopyta.org",
"https://bibliogram.pussthecat.org",
"https://bibliogram.nixnet.services",
"https://bibliogram.hamster.dance",
"https://insta.maisputain.ovh",
"https://bibliogram.ggc-project.de",
];
const osmInstances = ["https://openstreetmap.org"];
import commonHelper from "../../assets/javascripts/helpers/common.js";
import twitterHelper from "../../assets/javascripts/helpers/twitter.js";
import youtubeHelper from "../../assets/javascripts/helpers/youtube.js";
import instagramHelper from "../../assets/javascripts/helpers/instagram.js";
import mapsHelper from "../../assets/javascripts/helpers/google-maps.js";
import redditHelper from "../../assets/javascripts/helpers/reddit.js";
import searchHelper from "../../assets/javascripts/helpers/google-search.js";
import googleTranslateHelper from "../../assets/javascripts/helpers/google-translate.js";
import wikipediaHelper from "../../assets/javascripts/helpers/wikipedia.js";
const nitterInstances = twitterHelper.redirects;
const invidiousInstances = youtubeHelper.redirects;
const bibliogramInstances = instagramHelper.redirects;
const osmInstances = mapsHelper.redirects;
const redditInstances = redditHelper.redirects;
const searchEngineInstances = searchHelper.redirects;
const simplyTranslateInstances = googleTranslateHelper.redirects;
const wikipediaInstances = wikipediaHelper.redirects;
const autocompletes = [
{ id: "nitter-instance", instances: nitterInstances },
{ id: "invidious-instance", instances: invidiousInstances },
{ id: "bibliogram-instance", instances: bibliogramInstances },
{ id: "osm-instance", instances: osmInstances },
{ id: "reddit-instance", instances: redditInstances },
{
id: "search-engine-instance",
instances: searchEngineInstances.map((instance) => instance.link),
},
{ id: "simply-translate-instance", instances: simplyTranslateInstances },
{ id: "wikipedia-instance", instances: wikipediaInstances },
];
const domparser = new DOMParser();
let nitterInstance = document.getElementById("nitter-instance");
let invidiousInstance = document.getElementById("invidious-instance");
let bibliogramInstance = document.getElementById("bibliogram-instance");
let osmInstance = document.getElementById("osm-instance");
let redditInstance = document.getElementById("reddit-instance");
let searchEngineInstance = document.getElementById("search-engine-instance");
let simplyTranslateInstance = document.getElementById(
"simply-translate-instance"
);
let wikipediaInstance = document.getElementById("wikipedia-instance");
let disableNitter = document.getElementById("disable-nitter");
let disableInvidious = document.getElementById("disable-invidious");
let disableBibliogram = document.getElementById("disable-bibliogram");
let disableOsm = document.getElementById("disable-osm");
let disableReddit = document.getElementById("disable-reddit");
let disableSearchEngine = document.getElementById("disable-search-engine");
let disableSimplyTranslate = document.getElementById(
"disable-simply-translate"
);
let disableWikipedia = document.getElementById("disable-wikipedia");
let alwaysProxy = document.getElementById("always-proxy");
let onlyEmbeddedVideo = document.getElementById("only-embed");
let videoQuality = document.getElementById("video-quality");
@ -71,6 +64,10 @@ let invidiousPlayerStyle = document.getElementById("invidious-player-style");
let invidiousSubtitles = document.getElementById("invidious-subtitles");
let invidiousAutoplay = document.getElementById("invidious-autoplay");
let theme = document.getElementById("theme");
let useFreeTube = document.getElementById("use-freetube");
let nitterRandomPool = document.getElementById("nitter-random-pool");
let invidiousRandomPool = document.getElementById("invidious-random-pool");
let bibliogramRandomPool = document.getElementById("bibliogram-random-pool");
let exceptions;
window.browser = window.browser || window.chrome;
@ -87,7 +84,9 @@ function prependExceptionsItem(item, index) {
<line x1='368' y1='144' x2='144' y2='368'
style='fill:none;stroke:#FFF;stroke-linecap:round;stroke-linejoin:round;stroke-width:32px' />
</svg>`;
button.innerHTML = svg;
button.appendChild(
domparser.parseFromString(svg, "image/svg+xml").documentElement
);
button.addEventListener("click", () => {
exceptions.splice(index, 1);
browser.storage.sync.set({
@ -103,10 +102,18 @@ browser.storage.sync.get(
"invidiousInstance",
"bibliogramInstance",
"osmInstance",
"redditInstance",
"searchEngineInstance",
"simplyTranslateInstance",
"wikipediaInstance",
"disableNitter",
"disableInvidious",
"disableBibliogram",
"disableOsm",
"disableReddit",
"disableSearchEngine",
"disableSimplyTranslate",
"disableWikipedia",
"alwaysProxy",
"onlyEmbeddedVideo",
"videoQuality",
@ -119,6 +126,10 @@ browser.storage.sync.get(
"invidiousAutoplay",
"exceptions",
"theme",
"useFreeTube",
"nitterRandomPool",
"invidiousRandomPool",
"bibliogramRandomPool",
],
(result) => {
theme.value = result.theme || "";
@ -127,10 +138,19 @@ browser.storage.sync.get(
invidiousInstance.value = result.invidiousInstance || "";
bibliogramInstance.value = result.bibliogramInstance || "";
osmInstance.value = result.osmInstance || "";
redditInstance.value = result.redditInstance || "";
searchEngineInstance.value =
(result.searchEngineInstance && result.searchEngineInstance.link) || "";
simplyTranslateInstance.value = result.simplyTranslateInstance || "";
wikipediaInstance.value = result.wikipediaInstance || "";
disableNitter.checked = !result.disableNitter;
disableInvidious.checked = !result.disableInvidious;
disableBibliogram.checked = !result.disableBibliogram;
disableOsm.checked = !result.disableOsm;
disableReddit.checked = !result.disableReddit;
disableSearchEngine.checked = !result.disableSearchEngine;
disableSimplyTranslate.checked = !result.disableSimplyTranslate;
disableWikipedia.checked = !result.disableWikipedia;
alwaysProxy.checked = result.alwaysProxy;
onlyEmbeddedVideo.checked = result.onlyEmbeddedVideo;
videoQuality.value = result.videoQuality || "";
@ -146,6 +166,15 @@ browser.storage.sync.get(
invidiousPlayerStyle.value = result.invidiousPlayerStyle || "";
invidiousSubtitles.value = result.invidiousSubtitles || "";
invidiousAutoplay.checked = result.invidiousAutoplay;
useFreeTube.checked = result.useFreeTube;
nitterRandomPool.value =
result.nitterRandomPool || commonHelper.filterInstances(nitterInstances);
invidiousRandomPool.value =
result.invidiousRandomPool ||
commonHelper.filterInstances(invidiousInstances);
bibliogramRandomPool.value =
result.bibliogramRandomPool ||
commonHelper.filterInstances(bibliogramInstances);
}
);
@ -237,7 +266,7 @@ function parseURL(urlString) {
}
}
let nitterInstanceChange = debounce(() => {
const nitterInstanceChange = debounce(() => {
if (nitterInstance.checkValidity()) {
browser.storage.sync.set({
nitterInstance: parseURL(nitterInstance.value),
@ -246,7 +275,7 @@ let nitterInstanceChange = debounce(() => {
}, 500);
nitterInstance.addEventListener("input", nitterInstanceChange);
let invidiousInstanceChange = debounce(() => {
const invidiousInstanceChange = debounce(() => {
if (invidiousInstance.checkValidity()) {
browser.storage.sync.set({
invidiousInstance: parseURL(invidiousInstance.value),
@ -255,7 +284,7 @@ let invidiousInstanceChange = debounce(() => {
}, 500);
invidiousInstance.addEventListener("input", invidiousInstanceChange);
let bibliogramInstanceChange = debounce(() => {
const bibliogramInstanceChange = debounce(() => {
if (bibliogramInstance.checkValidity()) {
browser.storage.sync.set({
bibliogramInstance: parseURL(bibliogramInstance.value),
@ -264,7 +293,7 @@ let bibliogramInstanceChange = debounce(() => {
}, 500);
bibliogramInstance.addEventListener("input", bibliogramInstanceChange);
let osmInstanceChange = debounce(() => {
const osmInstanceChange = debounce(() => {
if (osmInstance.checkValidity()) {
browser.storage.sync.set({
osmInstance: parseURL(osmInstance.value),
@ -273,6 +302,53 @@ let osmInstanceChange = debounce(() => {
}, 500);
osmInstance.addEventListener("input", osmInstanceChange);
const redditInstanceChange = debounce(() => {
if (redditInstance.checkValidity()) {
browser.storage.sync.set({
redditInstance: parseURL(redditInstance.value),
});
}
}, 500);
redditInstance.addEventListener("input", redditInstanceChange);
const searchEngineInstanceChange = debounce(() => {
const instance = searchEngineInstances.find(
(instance) => instance.link === searchEngineInstance.value
);
if (instance || !searchEngineInstance.value) {
browser.storage.sync.set({
searchEngineInstance: instance || searchEngineInstance.value,
});
} else {
searchEngineInstance.setCustomValidity("Must be an instance from the list");
}
}, 500);
searchEngineInstance.addEventListener("input", searchEngineInstanceChange);
const simplyTranslateInstanceChange = debounce(() => {
if (simplyTranslateInstance.checkValidity()) {
browser.storage.sync.set({
simplyTranslateInstance: parseURL(simplyTranslateInstance.value),
});
}
}, 500);
simplyTranslateInstance.addEventListener(
"input",
simplyTranslateInstanceChange
);
const wikipediaInstanceChange = debounce(() => {
if (wikipediaInstance.checkValidity()) {
browser.storage.sync.set({
wikipediaInstance: parseURL(wikipediaInstance.value),
});
}
}, 500);
wikipediaInstance.addEventListener(
"input",
wikipediaInstanceChange
);
disableNitter.addEventListener("change", (event) => {
browser.storage.sync.set({ disableNitter: !event.target.checked });
});
@ -289,6 +365,22 @@ disableOsm.addEventListener("change", (event) => {
browser.storage.sync.set({ disableOsm: !event.target.checked });
});
disableReddit.addEventListener("change", (event) => {
browser.storage.sync.set({ disableReddit: !event.target.checked });
});
disableSearchEngine.addEventListener("change", (event) => {
browser.storage.sync.set({ disableSearchEngine: !event.target.checked });
});
disableSimplyTranslate.addEventListener("change", (event) => {
browser.storage.sync.set({ disableSimplyTranslate: !event.target.checked });
});
disableWikipedia.addEventListener("change", (event) => {
browser.storage.sync.set({ disableWikipedia: !event.target.checked });
});
alwaysProxy.addEventListener("change", (event) => {
browser.storage.sync.set({ alwaysProxy: event.target.checked });
});
@ -315,7 +407,11 @@ persistInvidiousPrefs.addEventListener("change", (event) => {
browser.storage.sync.set({ persistInvidiousPrefs: event.target.checked });
});
let invidiousVolumeChange = debounce(() => {
useFreeTube.addEventListener("change", (event) => {
browser.storage.sync.set({ useFreeTube: event.target.checked });
});
const invidiousVolumeChange = debounce(() => {
document.querySelector(
"#volume-value"
).textContent = `${invidiousVolume.value}%`;
@ -332,12 +428,8 @@ invidiousPlayerStyle.addEventListener("change", (event) => {
});
});
let invidiousSubtitlesChange = debounce(() => {
if (invidiousInstance.checkValidity()) {
browser.storage.sync.set({
invidiousSubtitles: invidiousSubtitles.value,
});
}
const invidiousSubtitlesChange = debounce(() => {
browser.storage.sync.set({ invidiousSubtitles: invidiousSubtitles.value });
}, 500);
invidiousSubtitles.addEventListener("input", invidiousSubtitlesChange);
@ -345,6 +437,23 @@ invidiousAutoplay.addEventListener("change", (event) => {
browser.storage.sync.set({ invidiousAutoplay: event.target.checked });
});
const nitterRandomPoolChange = debounce(() => {
browser.storage.sync.set({ nitterRandomPool: nitterRandomPool.value });
}, 500);
nitterRandomPool.addEventListener("input", nitterRandomPoolChange);
const invidiousRandomPoolChange = debounce(() => {
browser.storage.sync.set({ invidiousRandomPool: invidiousRandomPool.value });
}, 500);
invidiousRandomPool.addEventListener("input", invidiousRandomPoolChange);
const bibliogramRandomPoolChange = debounce(() => {
browser.storage.sync.set({
bibliogramRandomPool: bibliogramRandomPool.value,
});
}, 500);
bibliogramRandomPool.addEventListener("input", bibliogramRandomPoolChange);
theme.addEventListener("change", (event) => {
const value = event.target.options[theme.selectedIndex].value;
switch (value) {
@ -412,12 +521,17 @@ function autocomplete(input, list) {
}
}
function getItem(item, val) {
let div = document.createElement("div");
div.innerHTML = "<strong>" + item.substr(0, val.length) + "</strong>";
div.innerHTML += item.substr(val.length);
div.innerHTML += "<input type='hidden' value='" + item + "'>";
const div = document.createElement("div");
const strong = document.createElement("strong");
strong.textContent = item.substr(0, val.length);
div.innerText = item.substr(val.length);
const hiddenInput = document.createElement("input");
hiddenInput.type = "hidden";
hiddenInput.value = item;
div.prepend(strong);
div.appendChild(hiddenInput);
div.addEventListener("click", function (e) {
input.value = e.target.getElementsByTagName("input")[0].value;
input.value = div.getElementsByTagName("input")[0].value;
input.dispatchEvent(new Event("input"));
closeAllLists();
});
@ -453,3 +567,18 @@ function autocomplete(input, list) {
autocompletes.forEach((value) => {
autocomplete(document.getElementById(value.id), value.instances);
});
var coll = document.getElementsByClassName("collapsible");
var i;
for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function () {
this.classList.toggle("collapsible-active");
var content = this.nextElementSibling;
if (content.style.display === "block") {
content.style.display = "none";
} else {
content.style.display = "block";
}
});
}

View File

@ -4,7 +4,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title></title>
<link href="../styles.css" rel="stylesheet" />
<link href="../../assets/stylesheets/styles.css" rel="stylesheet" />
</head>
<body class="popup">
@ -116,6 +116,101 @@
</table>
</section>
<section class="settings-block">
<table class="option" aria-label="Toggle old Reddit redirects">
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_disableReddit__">Reddit Redirects</h1>
</td>
<td>
<input
aria-hidden="true"
id="disable-reddit"
type="checkbox"
checked
/>&nbsp;
<label for="disable-reddit" class="checkbox-label"> </label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<table class="option" aria-label="Toggle Search Engine redirects">
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_disableSearchEngine__">
Search Engine Redirects
</h1>
</td>
<td>
<input
aria-hidden="true"
id="disable-searchEngine"
type="checkbox"
checked
/>&nbsp;
<label for="disable-searchEngine" class="checkbox-label"></label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<table class="option" aria-label="Toggle SimplyTranslate redirects">
<tbody>
<tr>
<td>
<h1 data-localise="__MSG_disableSimplyTranslate__">
SimplyTranslate Redirects
</h1>
</td>
<td>
<input
aria-hidden="true"
id="disable-simplyTranslate"
type="checkbox"
/>&nbsp;
<label
for="disable-simplyTranslate"
class="checkbox-label"
></label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block">
<table class="option" aria-label="Toggle Wikipedia redirects">
<tbody>
<tr>
<td>
<h1
data-localise="__MSG_disableWikipedia__"
class="new-badge"
data-new-badge
>
Wikipedia Redirects
</h1>
</td>
<td>
<input
aria-hidden="true"
id="disable-wikipedia"
type="checkbox"
/>&nbsp;
<label for="disable-wikipedia" class="checkbox-label"></label>
</td>
</tr>
</tbody>
</table>
</section>
<section class="settings-block"></section>
<footer>
@ -164,7 +259,7 @@
</a>
</footer>
<script src="./popup.js"></script>
<script src="../../assets/javascript/localise.js"></script>
<script type="module" src="./popup.js"></script>
<script src="../../assets/javascripts/localise.js"></script>
</body>
</html>

View File

@ -4,6 +4,10 @@ let disableNitter = document.querySelector("#disable-nitter");
let disableInvidious = document.querySelector("#disable-invidious");
let disableBibliogram = document.querySelector("#disable-bibliogram");
let disableOsm = document.querySelector("#disable-osm");
let disableReddit = document.querySelector("#disable-reddit");
let disableSearchEngine = document.querySelector("#disable-searchEngine");
let disableSimplyTranslate = document.querySelector("#disable-simplyTranslate");
let disableWikipedia = document.querySelector("#disable-wikipedia");
let version = document.querySelector("#version");
window.browser = window.browser || window.chrome;
@ -14,6 +18,10 @@ browser.storage.sync.get(
"disableInvidious",
"disableBibliogram",
"disableOsm",
"disableReddit",
"disableSearchEngine",
"disableSimplyTranslate",
"disableWikipedia",
"theme",
],
(result) => {
@ -22,6 +30,10 @@ browser.storage.sync.get(
disableInvidious.checked = !result.disableInvidious;
disableBibliogram.checked = !result.disableBibliogram;
disableOsm.checked = !result.disableOsm;
disableReddit.checked = !result.disableReddit;
disableSearchEngine.checked = !result.disableSearchEngine;
disableSimplyTranslate.checked = !result.disableSimplyTranslate;
disableWikipedia.checked = !result.disableWikipedia;
}
);
@ -43,6 +55,22 @@ disableOsm.addEventListener("change", (event) => {
browser.storage.sync.set({ disableOsm: !event.target.checked });
});
disableReddit.addEventListener("change", (event) => {
browser.storage.sync.set({ disableReddit: !event.target.checked });
});
disableSearchEngine.addEventListener("change", (event) => {
browser.storage.sync.set({ disableSearchEngine: !event.target.checked });
});
disableSimplyTranslate.addEventListener("change", (event) => {
browser.storage.sync.set({ disableSimplyTranslate: !event.target.checked });
});
disableWikipedia.addEventListener("change", (event) => {
browser.storage.sync.set({ disableWikipedia: !event.target.checked });
});
document.querySelector("#more-options").addEventListener("click", () => {
browser.runtime.openOptionsPage();
});

View File

@ -1,8 +1,8 @@
module.exports = {
ignoreFiles: [
'assets/images/Screen Shot*.png',
'assets/images/buy-me-a-coffee.png',
'assets/images/logo*.png',
'assets/images/badge*.png'
"assets/images/Screen Shot*.png",
"assets/images/buy-me-a-coffee.png",
"assets/images/logo*.png",
"assets/images/badge*.png",
],
};