Prepare for release 1.1.47

This commit is contained in:
SimonBrazell 2021-04-16 10:45:15 +10:00
parent a45e7def92
commit 7640e5c6bc
15 changed files with 894 additions and 13749 deletions

1
.nvmrc Normal file
View File

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

View File

@ -12,7 +12,8 @@
[![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) [![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)
- **BTC:** 3JZWooswwmmqQKw5iW6AYFfK5gcWTrvueE - **BTC:** `3JZWooswwmmqQKw5iW6AYFfK5gcWTrvueE`
- **ETH:** `0x90049dc59365dF683451319Aa4632aC61193dFA7`
<img src="https://img.shields.io/liberapay/receives/SimonBrazell.svg?logo=liberapay"> <img src="https://img.shields.io/liberapay/receives/SimonBrazell.svg?logo=liberapay">

14525
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "privacy-redirect", "name": "privacy-redirect",
"description": "Redirects Twitter, YouTube, Instagram & Google Maps requests to privacy friendly alternatives.", "description": "Redirects Twitter, YouTube, Instagram and more to privacy friendly alternatives.",
"engines": { "engines": {
"node": ">=10.0.0", "node": ">=10.0.0",
"npm": ">=5.6.0" "npm": ">=5.6.0"
@ -14,12 +14,12 @@
"url": "git+https://github.com/SimonBrazell/privacy-redirect.git" "url": "git+https://github.com/SimonBrazell/privacy-redirect.git"
}, },
"author": "SimonBrazell", "author": "SimonBrazell",
"license": "GPLv3", "license": "GPL-3.0-only",
"bugs": { "bugs": {
"url": "https://github.com/SimonBrazell/privacy-redirect/issues" "url": "https://github.com/SimonBrazell/privacy-redirect/issues"
}, },
"homepage": "https://github.com/SimonBrazell/privacy-redirect#readme", "homepage": "https://github.com/SimonBrazell/privacy-redirect#readme",
"devDependencies": { "devDependencies": {
"web-ext": "^5.4.1" "web-ext": "^6.0.0"
} }
} }

View File

@ -4,7 +4,7 @@
"description": "Name of the extension." "description": "Name of the extension."
}, },
"extensionDescription": { "extensionDescription": {
"message": "Redirects Twitter, YouTube, Instagram, Google Maps, Reddit & Google Search requests to privacy friendly alternatives.", "message": "Redirects Twitter, YouTube, Instagram and more to privacy friendly alternatives.",
"description": "Description of the extension." "description": "Description of the extension."
}, },
"nitterInstance": { "nitterInstance": {

View File

@ -15,6 +15,7 @@ const redirects = [
{ link: "https://engine.presearch.org", q: "/search" }, { link: "https://engine.presearch.org", q: "/search" },
{ link: "https://searx.silkky.cloud", q: "/" }, { link: "https://searx.silkky.cloud", q: "/" },
{ link: "https://search.trom.tf", q: "/" }, { link: "https://search.trom.tf", q: "/" },
{ link: "https://whooglesearch.net", q: "/search" },
{ link: "https://whoogle.sdf.org", q: "/search" }, { link: "https://whoogle.sdf.org", q: "/search" },
{ link: "https://whoogle.himiko.cloud", q: "/search" }, { link: "https://whoogle.himiko.cloud", q: "/search" },
{ link: "https://whoogle-search.zeet.app", q: "/search" }, { link: "https://whoogle-search.zeet.app", q: "/search" },

View File

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

View File

@ -13,7 +13,7 @@ const redirects = [
"https://bibliogram.hamster.dance", "https://bibliogram.hamster.dance",
"https://bibliogram.kavin.rocks", "https://bibliogram.kavin.rocks",
"https://insta.trom.tf", "https://insta.trom.tf",
"https://bibliogram.hamster.dance" "https://bibliogram.hamster.dance",
]; ];
const reservedPaths = [ const reservedPaths = [
"about", "about",

View File

@ -1,5 +1,5 @@
/* /*
Please remember to also update the manifest.json file Please remember to also update the src/manifest.json file
(content_scripts > matches, 'remove-twitter-sw.js') (content_scripts > matches, 'remove-twitter-sw.js')
when updating this list: when updating this list:
*/ */
@ -10,6 +10,11 @@ const targets = [
"pbs.twimg.com", "pbs.twimg.com",
"video.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 = [ const redirects = [
"https://nitter.net", "https://nitter.net",
"https://nitter.snopyta.org", "https://nitter.snopyta.org",

View File

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

View File

@ -16,9 +16,9 @@ const nitterInstances = [
"https://nitter.kavin.rocks", "https://nitter.kavin.rocks",
"https://tweet.lambda.dance", "https://tweet.lambda.dance",
"https://nitter.cc", "https://nitter.cc",
"https://nitter.weaponizedhumiliation.com",
"https://nitter.vxempire.xyz", "https://nitter.vxempire.xyz",
"https://nitter.unixfox.eu", "https://nitter.unixfox.eu",
"https://bird.trom.tf",
]; ];
let disableNitter; let disableNitter;

View File

@ -1,7 +1,7 @@
{ {
"name": "__MSG_extensionName__", "name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__", "description": "__MSG_extensionDescription__",
"version": "1.1.46", "version": "1.1.47",
"manifest_version": 2, "manifest_version": 2,
"background": { "background": {
"page": "pages/background/background.html", "page": "pages/background/background.html",
@ -57,10 +57,8 @@
"*://invidious.tinfoil-hat.net/*", "*://invidious.tinfoil-hat.net/*",
"*://invidious.namazso.eu/*", "*://invidious.namazso.eu/*",
"*://vid.puffyan.us/*", "*://vid.puffyan.us/*",
"*://invidious.048596.xyz/*",
"*://dev.viewtube.io/*", "*://dev.viewtube.io/*",
"*://fz253lmuao3strwbfbmx46yu7acac2jz27iwtorgmbqlkurlclmancad.onion/*", "*://invidious.048596.xyz/*",
"*://invidious.048596.yxz/*",
"*://fz253lmuao3strwbfbmx46yu7acac2jz27iwtorgmbqlkurlclmancad.onion/*", "*://fz253lmuao3strwbfbmx46yu7acac2jz27iwtorgmbqlkurlclmancad.onion/*",
"*://qklhadlycap4cnod.onion/*", "*://qklhadlycap4cnod.onion/*",
"*://c7hqkpkpemu6e7emz5b4vyz7idjgdvgaaa3dyimmeojqbgpea3xqjoid.onion/*", "*://c7hqkpkpemu6e7emz5b4vyz7idjgdvgaaa3dyimmeojqbgpea3xqjoid.onion/*",
@ -77,7 +75,8 @@
"web_accessible_resources": ["assets/javascripts/helpers/*"], "web_accessible_resources": ["assets/javascripts/helpers/*"],
"browser_specific_settings": { "browser_specific_settings": {
"gecko": { "gecko": {
"strict_min_version": "60.0" "id": "{b7f9d2cd-d772-4302-8c3f-eb941af36f76}",
"strict_min_version": "67.0"
} }
} }
} }

View File

@ -101,7 +101,8 @@ browser.storage.sync.get(
osmInstance = result.osmInstance || osmDefault; osmInstance = result.osmInstance || osmDefault;
redditInstance = result.redditInstance || redditDefault; redditInstance = result.redditInstance || redditDefault;
searchEngineInstance = result.searchEngineInstance; searchEngineInstance = result.searchEngineInstance;
simplyTranslateInstance = result.simplyTranslateInstance || simplyTranslateDefault; simplyTranslateInstance =
result.simplyTranslateInstance || simplyTranslateDefault;
disableNitter = result.disableNitter; disableNitter = result.disableNitter;
disableInvidious = result.disableInvidious; disableInvidious = result.disableInvidious;
disableBibliogram = result.disableBibliogram; disableBibliogram = result.disableBibliogram;
@ -149,7 +150,8 @@ browser.storage.onChanged.addListener((changes) => {
osmInstance = changes.osmInstance.newValue || osmDefault; osmInstance = changes.osmInstance.newValue || osmDefault;
} }
if ("simplyTranslateInstance" in changes) { if ("simplyTranslateInstance" in changes) {
simplyTranslateInstance = changes.simplyTranslateInstance.newValue || simplyTranslateDefault; simplyTranslateInstance =
changes.simplyTranslateInstance.newValue || simplyTranslateDefault;
} }
if ("redditInstance" in changes) { if ("redditInstance" in changes) {
redditInstance = changes.redditInstance.newValue || redditDefault; redditInstance = changes.redditInstance.newValue || redditDefault;
@ -547,7 +549,7 @@ browser.webRequest.onBeforeRequest.addListener(
} else if (googleTranslateDomains.includes(url.host)) { } else if (googleTranslateDomains.includes(url.host)) {
redirect = { redirect = {
redirectUrl: redirectGoogleTranslate(url, initiator), redirectUrl: redirectGoogleTranslate(url, initiator),
} };
} }
if (redirect && redirect.redirectUrl) { if (redirect && redirect.redirectUrl) {
console.info( console.info(
@ -567,13 +569,21 @@ browser.webRequest.onBeforeRequest.addListener(
); );
browser.runtime.onInstalled.addListener((details) => { browser.runtime.onInstalled.addListener((details) => {
browser.storage.sync.get(["disableSearchEngine"], (result) => { browser.storage.sync.get(
["disableSearchEngine", "disableSimplyTranslate"],
(result) => {
if (result.disableSearchEngine === undefined) { if (result.disableSearchEngine === undefined) {
browser.storage.sync.set({ browser.storage.sync.set({
disableSearchEngine: true, disableSearchEngine: true,
}); });
} }
if (result.disableSimplyTranslate === undefined) {
browser.storage.sync.set({
disableSimplyTranslate: true,
}); });
}
}
);
if (details.reason === "update") { if (details.reason === "update") {
browser.storage.sync.get( browser.storage.sync.get(
["whitelist", "exceptions", "invidiousInstance", "disableSearchEngine"], ["whitelist", "exceptions", "invidiousInstance", "disableSearchEngine"],

View File

@ -147,7 +147,7 @@
<tbody> <tbody>
<tr> <tr>
<td> <td>
<h1 data-localise="__MSG_disableSearchEngine__" class="new-badge" data-new-badge> <h1 data-localise="__MSG_disableSearchEngine__">
Search Engine Redirects Search Engine Redirects
</h1> </h1>
</td> </td>

View File

@ -142,11 +142,7 @@
<tbody> <tbody>
<tr> <tr>
<td> <td>
<h1 <h1 data-localise="__MSG_disableSearchEngine__">
data-localise="__MSG_disableSearchEngine__"
class="new-badge"
data-new-badge
>
Search Engine Redirects Search Engine Redirects
</h1> </h1>
</td> </td>
@ -183,7 +179,10 @@
id="disable-simplyTranslate" id="disable-simplyTranslate"
type="checkbox" type="checkbox"
/>&nbsp; />&nbsp;
<label for="disable-simplyTranslate" class="checkbox-label"></label> <label
for="disable-simplyTranslate"
class="checkbox-label"
></label>
</td> </td>
</tr> </tr>
</tbody> </tbody>