parent
3e2079633a
commit
8b7581e4e2
|
@ -2,7 +2,7 @@ window.browser = window.browser || window.chrome;
|
||||||
|
|
||||||
import utils from './utils.js'
|
import utils from './utils.js'
|
||||||
|
|
||||||
const targets = /^https?:\/{2}([im]\.)?imgur\.com(\/|$)/
|
const targets = /^https?:\/{2}([im]\.)?imgur\.(com|io)(\/|$)/
|
||||||
|
|
||||||
let redirects = {
|
let redirects = {
|
||||||
"rimgo": {
|
"rimgo": {
|
||||||
|
|
|
@ -307,17 +307,21 @@ function getCookiesFromStorage(frontend, urls, name) {
|
||||||
browser.storage.local.get([key, 'firstPartyIsolate'], r => {
|
browser.storage.local.get([key, 'firstPartyIsolate'], r => {
|
||||||
const cookie = r[key];
|
const cookie = r[key];
|
||||||
if (cookie === undefined) return;
|
if (cookie === undefined) return;
|
||||||
let query;
|
for (const url of urls) {
|
||||||
if (!r.firstPartyIsolate) query = {
|
let query =
|
||||||
url: url, name: cookie.name, value: cookie.value, secure: true,
|
r.firstPartyIsolate ?
|
||||||
expirationDate: cookie.expirationDate,
|
{
|
||||||
};
|
url: url, name: cookie.name, value: cookie.value, secure: true,
|
||||||
else query = {
|
expirationDate: null,
|
||||||
url: url, name: cookie.name, value: cookie.value, secure: true,
|
firstPartyDomain: new URL(url).hostname,
|
||||||
expirationDate: null,
|
}
|
||||||
firstPartyDomain: new URL(url).hostname,
|
:
|
||||||
|
{
|
||||||
|
url: url, name: cookie.name, value: cookie.value, secure: true,
|
||||||
|
expirationDate: cookie.expirationDate,
|
||||||
|
};
|
||||||
|
browser.cookies.set(query)
|
||||||
}
|
}
|
||||||
for (const url of urls) browser.cookies.set(query)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "__MSG_extensionName__",
|
"name": "__MSG_extensionName__",
|
||||||
"description": "__MSG_extensionDescription__",
|
"description": "__MSG_extensionDescription__",
|
||||||
"version": "2.2.0",
|
"version": "2.2.1",
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"browser_specific_settings": {
|
"browser_specific_settings": {
|
||||||
"gecko": {
|
"gecko": {
|
||||||
|
|
|
@ -45,6 +45,7 @@ let disableElement = document.getElementById("disable-simplyTranslate");
|
||||||
let disableWikipediaElement = document.getElementById("disable-wikipedia");
|
let disableWikipediaElement = document.getElementById("disable-wikipedia");
|
||||||
let disableMediumElement = document.getElementById("disable-medium");
|
let disableMediumElement = document.getElementById("disable-medium");
|
||||||
let disableQuoraElement = document.getElementById("disable-quora");
|
let disableQuoraElement = document.getElementById("disable-quora");
|
||||||
|
let disableImdbElement = document.getElementById("disable-imdb");
|
||||||
let disableReutersElement = document.getElementById("disable-reuters");
|
let disableReutersElement = document.getElementById("disable-reuters");
|
||||||
let disablePeertubeElement = document.getElementById("disable-peertube");
|
let disablePeertubeElement = document.getElementById("disable-peertube");
|
||||||
let disableLbryElement = document.getElementById("disable-lbry");
|
let disableLbryElement = document.getElementById("disable-lbry");
|
||||||
|
@ -67,6 +68,7 @@ browser.storage.local.get(
|
||||||
"disableTiktok",
|
"disableTiktok",
|
||||||
"disableMedium",
|
"disableMedium",
|
||||||
"disableQuora",
|
"disableQuora",
|
||||||
|
"disableImdb",
|
||||||
"disableReuters",
|
"disableReuters",
|
||||||
"disablePeertubeTargets",
|
"disablePeertubeTargets",
|
||||||
"disableLbryTargets",
|
"disableLbryTargets",
|
||||||
|
@ -88,6 +90,7 @@ browser.storage.local.get(
|
||||||
disableTiktokElement.checked = !r.disableTiktok;
|
disableTiktokElement.checked = !r.disableTiktok;
|
||||||
disableMediumElement.checked = !r.disableMedium;
|
disableMediumElement.checked = !r.disableMedium;
|
||||||
disableQuoraElement.checked = !r.disableQuora;
|
disableQuoraElement.checked = !r.disableQuora;
|
||||||
|
disableImdbElement.checked = !r.disableImdb;
|
||||||
disableReutersElement.checked = !r.disableReuters;
|
disableReutersElement.checked = !r.disableReuters;
|
||||||
disablePeertubeElement.checked = !r.disablePeertubeTargets;
|
disablePeertubeElement.checked = !r.disablePeertubeTargets;
|
||||||
disableLbryElement.checked = !r.disableLbryTargets;
|
disableLbryElement.checked = !r.disableLbryTargets;
|
||||||
|
@ -116,6 +119,7 @@ document.addEventListener("change", () => {
|
||||||
disableTiktok: !disableTiktokElement.checked,
|
disableTiktok: !disableTiktokElement.checked,
|
||||||
disableMedium: !disableMediumElement.checked,
|
disableMedium: !disableMediumElement.checked,
|
||||||
disableQuora: !disableQuoraElement.checked,
|
disableQuora: !disableQuoraElement.checked,
|
||||||
|
disableImdb: !disableImdbElement.checked,
|
||||||
disableReuters: !disableReutersElement.checked,
|
disableReuters: !disableReutersElement.checked,
|
||||||
disablePeertubeTargets: !disablePeertubeElement.checked,
|
disablePeertubeTargets: !disablePeertubeElement.checked,
|
||||||
disableLbryTargets: !disableLbryElement.checked,
|
disableLbryTargets: !disableLbryElement.checked,
|
||||||
|
|
Loading…
Reference in New Issue