Removed FPI settings unifying as it superceded by dFPI & ETP
This commit is contained in:
parent
ea4126d75e
commit
88e72a80b6
@ -33,7 +33,6 @@ async function initDefaults() {
|
||||
theme: "detect",
|
||||
popupServices: ["youtube", "twitter", "instagram", "tiktok", "imgur", "reddit", "quora", "translate", "maps"],
|
||||
autoRedirect: false,
|
||||
firstPartyIsolate: false,
|
||||
network: "clearnet",
|
||||
networkFallback: true,
|
||||
latencyThreshold: 1000,
|
||||
|
@ -521,7 +521,7 @@ function unifyPreferences(url, tabId) {
|
||||
const frontendObject = config.services[service].frontends[frontend]
|
||||
if ("cookies" in frontendObject.preferences) {
|
||||
for (const cookie of frontendObject.preferences.cookies) {
|
||||
await utils.copyCookie(frontendObject, url, instancesList, cookie)
|
||||
await utils.copyCookie(url, instancesList, cookie)
|
||||
}
|
||||
}
|
||||
if ("localstorage" in frontendObject.preferences) {
|
||||
@ -652,7 +652,6 @@ function upgradeOptions() {
|
||||
options.popupServices.splice(tmp, 1)
|
||||
options.popupServices.push("sendFiles")
|
||||
}
|
||||
options.firstPartyIsolate = r.firstPartyIsolate
|
||||
options.autoRedirect = r.autoRedirect
|
||||
switch (r.onlyEmbeddedVideo) {
|
||||
case "onlyNotEmbedded":
|
||||
|
@ -280,46 +280,28 @@ async function testLatency(element, instances, frontend) {
|
||||
})
|
||||
}
|
||||
|
||||
function copyCookie(frontend, targetUrl, urls, name) {
|
||||
function copyCookie(targetUrl, urls, name) {
|
||||
return new Promise(resolve => {
|
||||
browser.storage.local.get("options", r => {
|
||||
let query
|
||||
if (!r.options.firstPartyIsolate)
|
||||
query = {
|
||||
url: protocolHost(targetUrl),
|
||||
name: name,
|
||||
}
|
||||
else
|
||||
query = {
|
||||
url: protocolHost(targetUrl),
|
||||
name: name,
|
||||
firstPartyDomain: null,
|
||||
}
|
||||
browser.cookies.getAll(query, async cookies => {
|
||||
for (const cookie of cookies)
|
||||
if (cookie.name == name) {
|
||||
for (const url of urls) {
|
||||
const setQuery = r.options.firstPartyIsolate
|
||||
? {
|
||||
url: url,
|
||||
name: name,
|
||||
value: cookie.value,
|
||||
secure: true,
|
||||
firstPartyDomain: new URL(url).hostname,
|
||||
}
|
||||
: {
|
||||
url: url,
|
||||
name: name,
|
||||
value: cookie.value,
|
||||
secure: true,
|
||||
expirationDate: cookie.expirationDate,
|
||||
}
|
||||
browser.cookies.set(setQuery)
|
||||
const query = {
|
||||
url: protocolHost(targetUrl),
|
||||
name: name,
|
||||
}
|
||||
browser.cookies.getAll(query, async cookies => {
|
||||
for (const cookie of cookies)
|
||||
if (cookie.name == name) {
|
||||
for (const url of urls) {
|
||||
const setQuery = {
|
||||
url: url,
|
||||
name: name,
|
||||
value: cookie.value,
|
||||
secure: true,
|
||||
expirationDate: cookie.expirationDate,
|
||||
}
|
||||
break
|
||||
browser.cookies.set(setQuery)
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
break
|
||||
}
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
@ -138,7 +138,7 @@
|
||||
],
|
||||
"indexeddb": "hyperpipedb"
|
||||
},
|
||||
"name": "HyperPipe",
|
||||
"name": "Hyperpipe",
|
||||
"instanceList": true
|
||||
}
|
||||
},
|
||||
|
@ -170,8 +170,6 @@ for (const service in config.services) {
|
||||
})
|
||||
})
|
||||
}
|
||||
// const firstPartyIsolate = document.getElementById('firstPartyIsolate');
|
||||
// firstPartyIsolate.addEventListener("change", () => browser.storage.local.set({ firstPartyIsolate: firstPartyIsolate.checked }))
|
||||
|
||||
browser.storage.local.get("options", r => {
|
||||
autoRedirectElement.checked = r.options.autoRedirect
|
||||
@ -180,7 +178,6 @@ browser.storage.local.get("options", r => {
|
||||
networkFallbackCheckbox.checked = r.options.networkFallback
|
||||
latencyOutput.value = r.options.latencyThreshold
|
||||
let options = r.options
|
||||
// firstPartyIsolate.checked = r.firstPartyIsolate;
|
||||
|
||||
//let networkFallbackElement = document.getElementById("network-fallback")
|
||||
if (networkElement.value == "clearnet") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user