Added imgur.io #346. Fixed a typo in Unify. Fixed typo in IMDb #348

This commit is contained in:
ManeraKai 2022-06-19 15:49:11 +03:00
parent 3e2079633a
commit 8b7581e4e2
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
4 changed files with 20 additions and 12 deletions

View File

@ -2,7 +2,7 @@ window.browser = window.browser || window.chrome;
import utils from './utils.js'
const targets = /^https?:\/{2}([im]\.)?imgur\.com(\/|$)/
const targets = /^https?:\/{2}([im]\.)?imgur\.(com|io)(\/|$)/
let redirects = {
"rimgo": {

View File

@ -307,17 +307,21 @@ function getCookiesFromStorage(frontend, urls, name) {
browser.storage.local.get([key, 'firstPartyIsolate'], r => {
const cookie = r[key];
if (cookie === undefined) return;
let query;
if (!r.firstPartyIsolate) query = {
url: url, name: cookie.name, value: cookie.value, secure: true,
expirationDate: cookie.expirationDate,
};
else query = {
url: url, name: cookie.name, value: cookie.value, secure: true,
expirationDate: null,
firstPartyDomain: new URL(url).hostname,
for (const url of urls) {
let query =
r.firstPartyIsolate ?
{
url: url, name: cookie.name, value: cookie.value, secure: true,
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)
})
}

View File

@ -1,7 +1,7 @@
{
"name": "__MSG_extensionName__",
"description": "__MSG_extensionDescription__",
"version": "2.2.0",
"version": "2.2.1",
"manifest_version": 2,
"browser_specific_settings": {
"gecko": {

View File

@ -45,6 +45,7 @@ let disableElement = document.getElementById("disable-simplyTranslate");
let disableWikipediaElement = document.getElementById("disable-wikipedia");
let disableMediumElement = document.getElementById("disable-medium");
let disableQuoraElement = document.getElementById("disable-quora");
let disableImdbElement = document.getElementById("disable-imdb");
let disableReutersElement = document.getElementById("disable-reuters");
let disablePeertubeElement = document.getElementById("disable-peertube");
let disableLbryElement = document.getElementById("disable-lbry");
@ -67,6 +68,7 @@ browser.storage.local.get(
"disableTiktok",
"disableMedium",
"disableQuora",
"disableImdb",
"disableReuters",
"disablePeertubeTargets",
"disableLbryTargets",
@ -88,6 +90,7 @@ browser.storage.local.get(
disableTiktokElement.checked = !r.disableTiktok;
disableMediumElement.checked = !r.disableMedium;
disableQuoraElement.checked = !r.disableQuora;
disableImdbElement.checked = !r.disableImdb;
disableReutersElement.checked = !r.disableReuters;
disablePeertubeElement.checked = !r.disablePeertubeTargets;
disableLbryElement.checked = !r.disableLbryTargets;
@ -116,6 +119,7 @@ document.addEventListener("change", () => {
disableTiktok: !disableTiktokElement.checked,
disableMedium: !disableMediumElement.checked,
disableQuora: !disableQuoraElement.checked,
disableImdb: !disableImdbElement.checked,
disableReuters: !disableReutersElement.checked,
disablePeertubeTargets: !disablePeertubeElement.checked,
disableLbryTargets: !disableLbryElement.checked,