Merge pull request 'Latency threshold and offline instances' (https://codeberg.org/LibRedirect/libredirect/pulls/14) from latency into master

Reviewed-on: https://codeberg.org/LibRedirect/libredirect/pulls/14
This commit is contained in:
BobIsMyManager 2022-08-03 00:05:49 +02:00
commit 449cd43aec
32 changed files with 463 additions and 357 deletions

View File

@ -101,7 +101,7 @@ npm run start
### Install temporarily
open `about:addons`\
click on the settings button below the addon search bar and select `debug add-on`\
type in the address bar `about:debugging`\
press `load temporarily addon`
### Install in Firefox ESR, Developer Edition, Nightly

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -32,6 +32,7 @@ async function initDefaults() {
firstPartyIsolate: false,
protocol: "normal",
protocolFallback: true,
latencyThreshold: 1000,
},
() => resolve()
)

View File

@ -17,16 +17,19 @@ for (let i = 0; i < frontends.length; i++) {
}
function setRedirects(val) {
browser.storage.local.get("cloudflareBlackList", r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], r => {
redirects.libremdb = val
libremdbNormalRedirectsChecks = [...redirects.libremdb.normal]
for (const instance of r.cloudflareBlackList) {
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = libremdbNormalRedirectsChecks.indexOf(instance)
if (a > -1) libremdbNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set({
imdbRedirects: redirects,
libremdbNormalRedirectsChecks,
libremdbTorRedirectsChecks: [...redirects.libremdb.tor],
libremdbI2pRedirectsChecks: [...redirects.libremdb.i2p],
libremdbLokiRedirectsChecks: [...redirects.libremdb.loki],
})
})
}
@ -172,25 +175,32 @@ function initDefaults() {
for (let i = 0; i < frontends.length; i++) {
redirects[frontends[i]] = dataJson[frontends[i]]
}
browser.storage.local.set(
{
disableImdb: true,
imdbRedirects: redirects,
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], async r => {
libremdbNormalRedirectsChecks = [...redirects.libremdb.normal]
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = libremdbNormalRedirectsChecks.indexOf(instance)
if (a > -1) libremdbNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set(
{
disableImdb: true,
imdbRedirects: redirects,
libremdbNormalRedirectsChecks: [...redirects.libremdb.normal],
libremdbNormalCustomRedirects: [],
libremdbNormalRedirectsChecks,
libremdbNormalCustomRedirects: [],
libremdbTorRedirectsChecks: [...redirects.libremdb.tor],
libremdbTorCustomRedirects: [],
libremdbTorRedirectsChecks: [...redirects.libremdb.tor],
libremdbTorCustomRedirects: [],
libremdbI2pRedirectsChecks: [],
libremdbI2pCustomRedirects: [],
libremdbI2pRedirectsChecks: [],
libremdbI2pCustomRedirects: [],
libremdbLokiRedirectsChecks: [],
libremdbLokiCustomRedirects: [],
},
() => resolve()
)
libremdbLokiRedirectsChecks: [],
libremdbLokiCustomRedirects: [],
},
() => resolve()
)
})
})
})
}

View File

@ -16,39 +16,21 @@ for (let i = 0; i < frontends.length; i++) {
}
}
function setRedirects() {
return new Promise(resolve => {
fetch("/instances/data.json")
.then(response => response.text())
.then(async data => {
let dataJson = JSON.parse(data)
redirects.rimgo = dataJson.rimgo
rimgoNormalRedirectsChecks = [...redirects.rimgo.normal]
rimgoTorRedirectsChecks = [...redirects.rimgo.tor]
rimgoI2pRedirectsChecks = [...redirects.rimgo.i2p]
for (const instance of r.cloudflareBlackList) {
const a = rimgoNormalRedirectsChecks.indexOf(instance)
if (a > -1) rimgoNormalRedirectsChecks.splice(a, 1)
const b = rimgoTorRedirectsChecks.indexOf(instance)
if (b > -1) rimgoTorRedirectsChecks.splice(b, 1)
const c = rimgoI2pRedirectsChecks.indexOf(instance)
if (c > -1) rimgoI2pRedirectsChecks.splice(c, 1)
}
browser.storage.local.set(
{
imgurRedirects: redirects,
rimgoNormalRedirectsChecks,
rimgoTorRedirectsChecks,
rimgoI2pRedirectsChecks,
},
() => resolve()
)
})
function setRedirects(val) {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], r => {
redirects.rimgo = val
rimgoNormalRedirectsChecks = [...redirects.rimgo.normal]
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = rimgoNormalRedirectsChecks.indexOf(instance)
if (a > -1) rimgoNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set({
imgurRedirects: redirects,
rimgoNormalRedirectsChecks,
rimgoTorRedirectsChecks: [...redirects.rimgo.tor],
rimgoI2pRedirectsChecks: [...redirects.rimgo.i2p],
rimgoLokiRedirectsChecks: [...redirects.rimgo.loki],
})
})
}
@ -195,11 +177,11 @@ function initDefaults() {
for (let i = 0; i < frontends.length; i++) {
redirects[frontends[i]] = dataJson[frontends[i]]
}
browser.storage.local.get("cloudflareBlackList", async r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], async r => {
rimgoNormalRedirectsChecks = [...redirects.rimgo.normal]
for (const instance of r.cloudflareBlackList) {
const i = rimgoNormalRedirectsChecks.indexOf(instance)
if (i > -1) rimgoNormalRedirectsChecks.splice(i, 1)
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = rimgoNormalRedirectsChecks.indexOf(instance)
if (a > -1) rimgoNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set(
{

View File

@ -16,16 +16,19 @@ for (let i = 0; i < frontends.length; i++) {
}
function setRedirects(val) {
browser.storage.local.get("cloudflareBlackList", async r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], async r => {
redirects.bibliogram = val
bibliogramNormalRedirectsChecks = [...redirects.bibliogram.normal]
for (const instance of r.cloudflareBlackList) {
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = bibliogramNormalRedirectsChecks.indexOf(instance)
if (a > -1) bibliogramNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set({
instagramRedirects: redirects,
bibliogramNormalRedirectsChecks,
bibliogramTorRedirectsChecks: [...redirects.bibliogram.tor],
bibliogramI2pRedirectsChecks: [...redirects.bibliogram.i2p],
bibliogramLokiRedirectsChecks: [...redirects.bibliogram.loki],
})
})
}
@ -203,17 +206,17 @@ function initDefaults() {
for (let i = 0; i < frontends.length; i++) {
redirects[frontends[i]] = dataJson[frontends[i]]
}
browser.storage.local.get("cloudflareBlackList", r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], async r => {
bibliogramNormalRedirectsChecks = [...redirects.bibliogram.normal]
for (const instance of r.cloudflareBlackList) {
const i = bibliogramNormalRedirectsChecks.indexOf(instance)
if (i > -1) bibliogramNormalRedirectsChecks.splice(i, 1)
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = bibliogramNormalRedirectsChecks.indexOf(instance)
if (a > -1) bibliogramNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set({
disableInstagram: false,
instagramRedirects: redirects,
bibliogramNormalRedirectsChecks: bibliogramNormalRedirectsChecks,
bibliogramNormalRedirectsChecks,
bibliogramNormalCustomRedirects: [],
bibliogramTorRedirectsChecks: [...redirects.bibliogram.tor],

View File

@ -17,16 +17,19 @@ for (let i = 0; i < frontends.length; i++) {
}
function setRedirects(val) {
browser.storage.local.get("cloudflareBlackList", r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], r => {
redirects.librarian = val
librarianNormalRedirectsChecks = [...redirects.librarian.normal]
for (const instance of r.cloudflareBlackList) {
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = librarianNormalRedirectsChecks.indexOf(instance)
if (a > -1) librarianNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set({
lbryTargetsRedirects: redirects,
librarianNormalRedirectsChecks,
librarianTorRedirectsChecks: [...redirects.librarian.tor],
librarianI2pRedirectsChecks: [...redirects.librarian.i2p],
librarianLokiRedirectsChecks: [...redirects.librarian.loki],
})
})
}
@ -175,27 +178,34 @@ function initDefaults() {
for (let i = 0; i < frontends.length; i++) {
redirects[frontends[i]] = dataJson[frontends[i]]
}
browser.storage.local.set(
{
disableLbryTargets: true,
lbryFrontend: "librarian",
lbryTargetsRedirects: redirects,
lbryRedirectType: "both",
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], async r => {
librarianNormalRedirectsChecks = [...redirects.librarian.normal]
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = librarianNormalRedirectsChecks.indexOf(instance)
if (a > -1) librarianNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set(
{
disableLbryTargets: true,
lbryFrontend: "librarian",
lbryTargetsRedirects: redirects,
lbryRedirectType: "both",
librarianNormalRedirectsChecks: [...redirects.librarian.normal],
librarianNormalCustomRedirects: [],
librarianNormalRedirectsChecks,
librarianNormalCustomRedirects: [],
librarianTorRedirectsChecks: [...redirects.librarian.tor],
librarianTorCustomRedirects: [],
librarianTorRedirectsChecks: [...redirects.librarian.tor],
librarianTorCustomRedirects: [],
librarianI2pRedirectsChecks: [...redirects.librarian.i2p],
librarianI2pCustomRedirects: [],
librarianI2pRedirectsChecks: [...redirects.librarian.i2p],
librarianI2pCustomRedirects: [],
librarianLokiRedirectsChecks: [...redirects.librarian.loki],
librarianLokiCustomRedirects: [],
},
() => resolve()
)
librarianLokiRedirectsChecks: [...redirects.librarian.loki],
librarianLokiCustomRedirects: [],
},
() => resolve()
)
})
})
})
}

View File

@ -21,16 +21,19 @@ redirects.osm = {}
redirects.osm.normal = ["https://www.openstreetmap.org"]
function setRedirects(val) {
browser.storage.local.get("cloudflareBlackList", r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], r => {
redirects.facil = val
facilNormalRedirectsChecks = [...redirects.facil.normal]
for (const instance of r.cloudflareBlackList) {
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = facilNormalRedirectsChecks.indexOf(instance)
if (a > -1) facilNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set({
mapsRedirects: redirects,
facilNormalRedirectsChecks,
facilTorRedirectsChecks: [...redirects.facil.tor],
facilI2pRedirectsChecks: [...redirects.facil.i2p],
facilLokiRedirectsChecks: [...redirects.facil.loki],
})
})
}
@ -264,25 +267,32 @@ function initDefaults() {
for (let i = 0; i < frontends.length; i++) {
redirects[frontends[i]] = dataJson[frontends[i]]
}
browser.storage.local.set(
{
disableMaps: false,
mapsFrontend: "osm",
mapsRedirects: redirects,
facilNormalRedirectsChecks: [...redirects.facil.normal],
facilNormalCustomRedirects: [],
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], async r => {
facilNormalRedirectsChecks = [...redirects.facil.normal]
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = facilNormalRedirectsChecks.indexOf(instance)
if (a > -1) facilNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set(
{
disableMaps: false,
mapsFrontend: "osm",
mapsRedirects: redirects,
facilNormalRedirectsChecks,
facilNormalCustomRedirects: [],
facilTorRedirectsChecks: [...redirects.facil.tor],
facilTorCustomRedirects: [],
facilTorRedirectsChecks: [...redirects.facil.tor],
facilTorCustomRedirects: [],
facilI2pRedirectsChecks: [...redirects.facil.i2p],
facilI2pCustomRedirects: [],
facilI2pRedirectsChecks: [...redirects.facil.i2p],
facilI2pCustomRedirects: [],
facilLokiRedirectsChecks: [...redirects.facil.loki],
facilLokiCustomRedirects: [],
},
() => resolve()
)
facilLokiRedirectsChecks: [...redirects.facil.loki],
facilLokiCustomRedirects: [],
},
() => resolve()
)
})
})
})
}

View File

@ -40,16 +40,19 @@ for (let i = 0; i < frontends.length; i++) {
}
function setRedirects(val) {
browser.storage.local.get("cloudflareBlackList", r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], r => {
redirects.scribe = val
scribeNormalRedirectsChecks = [...redirects.scribe.normal]
for (const instance of r.cloudflareBlackList) {
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = scribeNormalRedirectsChecks.indexOf(instance)
if (a > -1) scribeNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set({
mediumRedirects: redirects,
scribeNormalRedirectsChecks,
scribeTorRedirectsChecks: [...redirects.scribe.tor],
scribeI2pRedirectsChecks: [...redirects.scribe.i2p],
scribeLokiRedirectsChecks: [...redirects.scribe.loki],
})
})
}
@ -181,18 +184,18 @@ function initDefaults() {
for (let i = 0; i < frontends.length; i++) {
redirects[frontends[i]] = dataJson[frontends[i]]
}
browser.storage.local.get("cloudflareBlackList", async r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], async r => {
scribeNormalRedirectsChecks = [...redirects.scribe.normal]
for (const instance of r.cloudflareBlackList) {
let i = scribeNormalRedirectsChecks.indexOf(instance)
if (i > -1) scribeNormalRedirectsChecks.splice(i, 1)
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = scribeNormalRedirectsChecks.indexOf(instance)
if (a > -1) scribeNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set(
{
disableMedium: false,
mediumRedirects: redirects,
scribeNormalRedirectsChecks: scribeNormalRedirectsChecks,
scribeNormalRedirectsChecks,
scribeNormalCustomRedirects: [],
scribeTorRedirectsChecks: [...redirects.scribe.tor],

View File

@ -15,16 +15,19 @@ for (let i = 0; i < frontends.length; i++) {
}
function setRedirects(val) {
browser.storage.local.get("cloudflareBlackList", r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], r => {
redirects.simpleertube = val
simpleertubeNormalRedirectsChecks = [...redirects.simpleertube.normal]
for (const instance of r.cloudflareBlackList) {
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = simpleertubeNormalRedirectsChecks.indexOf(instance)
if (a > -1) simpleertubeNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set({
peertubeRedirects: redirects,
simpleertubeNormalRedirectsChecks,
simpleertubeTorRedirectsChecks: [...redirects.simpleertube.tor],
simpleertubeI2pRedirectsChecks: [...redirects.simpleertube.i2p],
simpleertubeLokiRedirectsChecks: [...redirects.simpleertube.loki],
})
})
}
@ -162,11 +165,11 @@ function initDefaults() {
for (let i = 0; i < frontends.length; i++) {
redirects[frontends[i]] = dataJson[frontends[i]]
}
browser.storage.local.get("cloudflareBlackList", async r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], async r => {
simpleertubeNormalRedirectsChecks = [...redirects.simpleertube.normal]
for (const instance of r.cloudflareBlackList) {
let i = simpleertubeNormalRedirectsChecks.indexOf(instance)
if (i > -1) simpleertubeNormalRedirectsChecks.splice(i, 1)
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = simpleertubeNormalRedirectsChecks.indexOf(instance)
if (a > -1) simpleertubeNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set(
{
@ -174,7 +177,7 @@ function initDefaults() {
disablePeertubeTargets: true,
peertubeRedirects: redirects,
simpleertubeNormalRedirectsChecks: simpleertubeNormalRedirectsChecks,
simpleertubeNormalRedirectsChecks,
simpleertubeNormalCustomRedirects: [],
simpleertubeTorRedirectsChecks: [...redirects.simpleertube.tor],

View File

@ -17,16 +17,19 @@ for (let i = 0; i < frontends.length; i++) {
}
function setRedirects(val) {
browser.storage.local.get("cloudflareBlackList", r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], r => {
redirects.quetre = val
quetreNormalRedirectsChecks = [...redirects.quetre.normal]
for (const instance of r.cloudflareBlackList) {
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = quetreNormalRedirectsChecks.indexOf(instance)
if (a > -1) quetreNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set({
quoraRedirects: redirects,
quetreNormalRedirectsChecks,
quetreTorRedirectsChecks: [...redirects.quetre.tor],
quetreI2pRedirectsChecks: [...redirects.quetre.i2p],
quetreLokiRedirectsChecks: [...redirects.quetre.loki],
})
})
}
@ -157,26 +160,33 @@ function initDefaults() {
for (let i = 0; i < frontends.length; i++) {
redirects[frontends[i]] = dataJson[frontends[i]]
}
browser.storage.local.set(
{
disableQuora: false,
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], async r => {
quetreNormalRedirectsChecks = [...redirects.quetre.normal]
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = quetreNormalRedirectsChecks.indexOf(instance)
if (a > -1) quetreNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set(
{
disableQuora: false,
quoraRedirects: redirects,
quoraRedirects: redirects,
quetreNormalRedirectsChecks: [...redirects.quetre.normal],
quetreNormalCustomRedirects: [],
quetreNormalRedirectsChecks,
quetreNormalCustomRedirects: [],
quetreTorRedirectsChecks: [...redirects.quetre.tor],
quetreTorCustomRedirects: [],
quetreTorRedirectsChecks: [...redirects.quetre.tor],
quetreTorCustomRedirects: [],
quetreI2pRedirectsChecks: [...redirects.quetre.i2p],
quetreI2pCustomRedirects: [],
quetreI2pRedirectsChecks: [...redirects.quetre.i2p],
quetreI2pCustomRedirects: [],
quetreLokiRedirectsChecks: [...redirects.quetre.loki],
quetreLokiCustomRedirects: [],
},
() => resolve()
)
quetreLokiRedirectsChecks: [...redirects.quetre.loki],
quetreLokiCustomRedirects: [],
},
() => resolve()
)
})
})
})
}

View File

@ -16,11 +16,11 @@ for (let i = 0; i < frontends.length; i++) {
}
function setRedirects(val) {
browser.storage.local.get("cloudflareBlackList", r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], r => {
redirects = val
libredditNormalRedirectsChecks = [...redirects.libreddit.normal]
tedditNormalRedirectsChecks = [...redirects.teddit.normal]
for (const instance of r.cloudflareBlackList) {
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = libredditNormalRedirectsChecks.indexOf(instance)
if (a > -1) libredditNormalRedirectsChecks.splice(a, 1)
@ -30,7 +30,13 @@ function setRedirects(val) {
browser.storage.local.set({
redditRedirects: redirects,
libredditNormalRedirectsChecks,
libredditTorRedirectsChecks: [...redirects.libreddit.tor],
libredditI2pRedirectsChecks: [...redirects.libreddit.i2p],
libredditLokiRedirectsChecks: [...redirects.libreddit.loki],
tedditNormalRedirectsChecks,
tedditTorRedirectsChecks: [...redirects.teddit.tor],
tedditI2pRedirectsChecks: [...redirects.teddit.i2p],
tedditLokiRedirectsChecks: [...redirects.teddit.loki],
})
})
}
@ -330,17 +336,15 @@ function initDefaults() {
for (let i = 0; i < frontends.length; i++) {
redirects[frontends[i]] = dataJson[frontends[i]]
}
browser.storage.local.get("cloudflareBlackList", async r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], async r => {
libredditNormalRedirectsChecks = [...redirects.libreddit.normal]
tedditNormalRedirectsChecks = [...redirects.teddit.normal]
for (const instance of r.cloudflareBlackList) {
let i
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = libredditNormalRedirectsChecks.indexOf(instance)
if (a > -1) libredditNormalRedirectsChecks.splice(a, 1)
i = libredditNormalRedirectsChecks.indexOf(instance)
if (i > -1) libredditNormalRedirectsChecks.splice(i, 1)
i = tedditNormalRedirectsChecks.indexOf(instance)
if (i > -1) tedditNormalRedirectsChecks.splice(i, 1)
const b = tedditNormalRedirectsChecks.indexOf(instance)
if (b > -1) tedditNormalRedirectsChecks.splice(b, 1)
}
browser.storage.local.set(
{
@ -348,7 +352,7 @@ function initDefaults() {
redditFrontend: "libreddit",
redditRedirects: redirects,
libredditNormalRedirectsChecks: libredditNormalRedirectsChecks,
libredditNormalRedirectsChecks,
libredditNormalCustomRedirects: [],
libredditTorRedirectsChecks: [...redirects.libreddit.tor],
@ -360,7 +364,7 @@ function initDefaults() {
libredditLokiRedirectsChecks: [...redirects.libreddit.loki],
libredditLokiCustomRedirects: [],
tedditNormalRedirectsChecks: tedditNormalRedirectsChecks,
tedditNormalRedirectsChecks,
tedditNormalCustomRedirects: [],
tedditTorRedirectsChecks: [...redirects.teddit.tor],

View File

@ -17,16 +17,19 @@ for (let i = 0; i < frontends.length; i++) {
}
function setRedirects(val) {
browser.storage.local.get("cloudflareBlackList", r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], r => {
redirects.neuters = val
neutersNormalRedirectsChecks = [...redirects.neuters.normal]
for (const instance of r.cloudflareBlackList) {
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = neutersNormalRedirectsChecks.indexOf(instance)
if (a > -1) neutersNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set({
neutersRedirects: redirects,
neutersNormalRedirectsChecks,
neutersTorRedirectsChecks: [...redirects.neuters.tor],
neutersI2pRedirectsChecks: [...redirects.neuters.i2p],
neutersLokiRedirectsChecks: [...redirects.neuters.loki],
})
})
}
@ -109,26 +112,33 @@ function initDefaults() {
for (let i = 0; i < frontends.length; i++) {
redirects[frontends[i]] = dataJson[frontends[i]]
}
browser.storage.local.set(
{
disableReuters: true,
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], async r => {
neutersNormalRedirectsChecks = [...redirects.neuters.normal]
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = neutersNormalRedirectsChecks.indexOf(instance)
if (a > -1) neutersNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set(
{
disableReuters: true,
reutersRedirects: redirects,
reutersRedirects: redirects,
neutersNormalRedirectsChecks: [...redirects.neuters.normal],
neutersNormalCustomRedirects: [],
neutersNormalRedirectsChecks,
neutersNormalCustomRedirects: [],
neutersTorRedirectsChecks: [...redirects.neuters.tor],
neutersTorCustomRedirects: [],
neutersTorRedirectsChecks: [...redirects.neuters.tor],
neutersTorCustomRedirects: [],
neutersI2pRedirectsChecks: [...redirects.neuters.i2p],
neutersI2pCustomRedirects: [],
neutersI2pRedirectsChecks: [...redirects.neuters.i2p],
neutersI2pCustomRedirects: [],
neutersLokiRedirectsChecks: [...redirects.neuters.loki],
neutersLokiCustomRedirects: [],
},
() => resolve()
)
neutersLokiRedirectsChecks: [...redirects.neuters.loki],
neutersLokiCustomRedirects: [],
},
() => resolve()
)
})
})
})
}

View File

@ -8,52 +8,22 @@ const frontends = new Array("searx", "searxng", "whoogle", "librex")
const protocols = new Array("normal", "tor", "i2p", "loki")
const redirects = {}
/*
"searx": {
"normal": [],
"tor": [],
"i2p": []
},
"searxng": {
"normal": [],
"tor": [],
"i2p": []
},
"whoogle": {
"normal": [],
"tor": [],
"i2p": []
}
*/
//};
//let tmp = "{"
for (let i = 0; i < frontends.length; i++) {
//redirects.frontends[i] = {}
//redirects.push(frontends[i])
//tmp = frontends[i]
//tmp = tmp + '\n"' + frontends[i] + '": {'
redirects[frontends[i]] = {}
for (let x = 0; x < protocols.length; x++) {
//redirects.frontends[i].protocols = []
//tmp = tmp + '\n"' + protocols[x] + '": [],'
redirects[frontends[i]][protocols[x]] = []
}
//tmp = tmp + "\n},"
}
//tmp = tmp + "\n}"
//const redirects = JSON.parse(tmp)
function setRedirects(val) {
browser.storage.local.get("cloudflareBlackList", r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], r => {
redirects = val
searxNormalRedirectsChecks = [...redirects.searx.normal]
searxngNormalRedirectsChecks = [...redirects.searxng.normal]
whoogleNormalRedirectsChecks = [...redirects.whoogle.normal]
librexNormalRedirectsChecks = [...redirects.librex.normal]
for (const instance of r.cloudflareBlackList) {
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = searxNormalRedirectsChecks.indexOf(instance)
if (a > -1) searxNormalRedirectsChecks.splice(a, 1)
@ -69,9 +39,21 @@ function setRedirects(val) {
browser.storage.local.set({
searchRedirects: redirects,
searxNormalRedirectsChecks,
searxTorRedirectsChecks: [...redirects.searx.tor],
searxI2pRedirectsChecks: [...redirects.searx.i2p],
searxLokiRedirectsChecks: [...redirects.searx.loki],
searxngNormalRedirectsChecks,
searxngTorRedirectsChecks: [...redirects.searxng.tor],
searxngI2pRedirectsChecks: [...redirects.searxng.i2p],
searxngLokiRedirectsChecks: [...redirects.searxng.loki],
whoogleNormalRedirectsChecks,
whoogleTorRedirectsChecks: [...redirects.whoogle.tor],
whoogleI2pRedirectsChecks: [...redirects.whoogle.i2p],
whoogleLokiRedirectsChecks: [...redirects.whoogle.loki],
librexNormalRedirectsChecks,
librexTorRedirectsChecks: [...redirects.librex.tor],
librexI2pRedirectsChecks: [...redirects.librex.i2p],
librexLokiRedirectsChecks: [...redirects.librex.loki],
})
})
}
@ -499,34 +481,27 @@ function initDefaults() {
.then(response => response.text())
.then(async data => {
let dataJson = JSON.parse(data)
/*
redirects.searx = dataJson.searx;
redirects.searxng = dataJson.searxng;
redirects.whoogle = dataJson.whoogle;
*/
for (let i = 0; i < frontends.length; i++) {
redirects[frontends[i]] = dataJson[frontends[i]]
}
browser.storage.local.get("cloudflareBlackList", async r => {
whoogleNormalRedirectsChecks = [...redirects.whoogle.normal]
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], async r => {
searxNormalRedirectsChecks = [...redirects.searx.normal]
searxngNormalRedirectsChecks = [...redirects.searxng.normal]
whoogleNormalRedirectsChecks = [...redirects.whoogle.normal]
librexNormalRedirectsChecks = [...redirects.librex.normal]
for (const instance of r.cloudflareBlackList) {
let i
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = searxNormalRedirectsChecks.indexOf(instance)
if (a > -1) searxNormalRedirectsChecks.splice(a, 1)
i = whoogleNormalRedirectsChecks.indexOf(instance)
if (i > -1) whoogleNormalRedirectsChecks.splice(i, 1)
const b = searxngNormalRedirectsChecks.indexOf(instance)
if (b > -1) searxngNormalRedirectsChecks.splice(b, 1)
i = searxNormalRedirectsChecks.indexOf(instance)
if (i > -1) searxNormalRedirectsChecks.splice(i, 1)
const c = whoogleNormalRedirectsChecks.indexOf(instance)
if (c > -1) whoogleNormalRedirectsChecks.splice(c, 1)
i = searxngNormalRedirectsChecks.indexOf(instance)
if (i > -1) searxngNormalRedirectsChecks.splice(i, 1)
i = librexNormalRedirectsChecks.indexOf(instance)
if (i > -1) librexNormalRedirectsChecks.splice(i, 1)
const d = librexNormalRedirectsChecks.indexOf(instance)
if (d > -1) librexNormalRedirectsChecks.splice(d, 1)
}
browser.storage.local.set(
{
@ -535,7 +510,7 @@ function initDefaults() {
searchRedirects: redirects,
searxngCustomSettings: false,
whoogleNormalRedirectsChecks: whoogleNormalRedirectsChecks,
whoogleNormalRedirectsChecks,
whoogleNormalCustomRedirects: [],
whoogleTorRedirectsChecks: [...redirects.whoogle.tor],
@ -547,7 +522,7 @@ function initDefaults() {
whoogleLokiRedirectsChecks: [...redirects.whoogle.loki],
whoogleLokiCustomRedirects: [],
searxNormalRedirectsChecks: searxNormalRedirectsChecks,
searxNormalRedirectsChecks,
searxNormalCustomRedirects: [],
searxTorRedirectsChecks: [...redirects.searx.tor],
@ -559,7 +534,7 @@ function initDefaults() {
searxLokiRedirectsChecks: [...redirects.searx.loki],
searxLokiCustomRedirects: [],
searxngNormalRedirectsChecks: searxngNormalRedirectsChecks,
searxngNormalRedirectsChecks,
searxngNormalCustomRedirects: [],
searxngTorRedirectsChecks: [...redirects.searxng.tor],
@ -571,7 +546,7 @@ function initDefaults() {
searxngLokiRedirectsChecks: [...redirects.searxng.loki],
searxngLokiCustomRedirects: [],
librexNormalRedirectsChecks: librexNormalRedirectsChecks,
librexNormalRedirectsChecks,
librexNormalCustomRedirects: [],
librexTorRedirectsChecks: [...redirects.librex.tor],

View File

@ -17,16 +17,19 @@ for (let i = 0; i < frontends.length; i++) {
}
function setRedirects(val) {
browser.storage.local.get("cloudflareBlackList", r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], r => {
redirects.send = val
sendNormalRedirectsChecks = [...redirects.send.normal]
for (const instance of r.cloudflareBlackList) {
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = sendNormalRedirectsChecks.indexOf(instance)
if (a > -1) sendNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set({
sendTargetsRedirects: redirects,
sendNormalRedirectsChecks,
sendTorRedirectsChecks: [...redirects.send.tor],
sendI2pRedirectsChecks: [...redirects.send.i2p],
sendLokiRedirectsChecks: [...redirects.send.loki],
})
})
}
@ -154,18 +157,18 @@ function initDefaults() {
for (let i = 0; i < frontends.length; i++) {
redirects[frontends[i]] = dataJson[frontends[i]]
}
browser.storage.local.get("cloudflareBlackList", async r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], async r => {
sendNormalRedirectsChecks = [...redirects.send.normal]
for (const instance of r.cloudflareBlackList) {
let i = sendNormalRedirectsChecks.indexOf(instance)
if (i > -1) sendNormalRedirectsChecks.splice(i, 1)
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = sendNormalRedirectsChecks.indexOf(instance)
if (a > -1) sendNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set(
{
disableSendTarget: false,
sendTargetsRedirects: redirects,
sendNormalRedirectsChecks: sendNormalRedirectsChecks,
sendNormalRedirectsChecks,
sendNormalCustomRedirects: [],
sendTorRedirectsChecks: [...redirects.send.tor],

View File

@ -17,16 +17,19 @@ for (let i = 0; i < frontends.length; i++) {
}
function setRedirects(val) {
browser.storage.local.get("cloudflareBlackList", r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], r => {
redirects.proxiTok = val
proxiTokNormalRedirectsChecks = [...redirects.proxiTok.normal]
for (const instance of r.cloudflareBlackList) {
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = proxiTokNormalRedirectsChecks.indexOf(instance)
if (a > -1) proxiTokNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set({
tiktokRedirects: redirects,
proxiTokNormalRedirectsChecks,
proxiTokTorRedirectsChecks: [...redirects.proxiTok.tor],
proxiTokI2pRedirectsChecks: [...redirects.proxiTok.i2p],
proxiTokLokiRedirectsChecks: [...redirects.proxiTok.loki],
})
})
}
@ -202,26 +205,33 @@ function initDefaults() {
for (let i = 0; i < frontends.length; i++) {
redirects[frontends[i]] = dataJson[frontends[i]]
}
browser.storage.local.set(
{
disableTiktok: false,
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], async r => {
proxiTokNormalRedirectsChecks = [...redirects.proxiTok.normal]
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = proxiTokNormalRedirectsChecks.indexOf(instance)
if (a > -1) proxiTokNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set(
{
disableTiktok: false,
tiktokRedirects: redirects,
tiktokRedirects: redirects,
proxiTokNormalRedirectsChecks: [...redirects.proxiTok.normal],
proxiTokNormalCustomRedirects: [],
proxiTokNormalRedirectsChecks,
proxiTokNormalCustomRedirects: [],
proxiTokTorRedirectsChecks: [...redirects.proxiTok.tor],
proxiTokTorCustomRedirects: [],
proxiTokTorRedirectsChecks: [...redirects.proxiTok.tor],
proxiTokTorCustomRedirects: [],
proxiTokI2pRedirectsChecks: [...redirects.proxiTok.i2p],
proxiTokI2pCustomRedirects: [],
proxiTokI2pRedirectsChecks: [...redirects.proxiTok.i2p],
proxiTokI2pCustomRedirects: [],
proxiTokLokiRedirectsChecks: [...redirects.proxiTok.loki],
proxiTokLokiCustomRedirects: [],
},
() => resolve()
)
proxiTokLokiRedirectsChecks: [...redirects.proxiTok.loki],
proxiTokLokiCustomRedirects: [],
},
() => resolve()
)
})
})
})
}

View File

@ -91,21 +91,27 @@ init()
browser.storage.onChanged.addListener(init)
function setRedirects(val) {
browser.storage.local.get("cloudflareBlackList", r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], r => {
redirects = val
simplyTranslateNormalRedirectsChecks = [...redirects.simplyTranslate.normal]
lingvaNormalRedirectsChecks = [...redirects.lingva.normal]
for (const instance of r.cloudflareBlackList) {
const i = lingvaNormalRedirectsChecks.indexOf(instance)
if (i > -1) lingvaNormalRedirectsChecks.splice(i, 1)
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = simplyTranslateNormalCustomRedirects.indexOf(instance)
if (a > -1) simplyTranslateNormalCustomRedirects.splice(a, 1)
const b = lingvaNormalRedirectsChecks.indexOf(instance)
if (b > -1) lingvaNormalRedirectsChecks.splice(b, 1)
}
browser.storage.local.set({
translateRedirects: redirects,
simplyTranslateNormalRedirectsChecks: redirects.simplyTranslate.normal,
simplyTranslateTorRedirectsChecks: redirects.simplyTranslate.tor,
simplyTranslateI2pRedirectsChecks: redirects.simplyTranslate.i2p,
simplyTranslateLokiRedirectsChecks: redirects.simplyTranslate.loki,
simplyTranslateNormalRedirectsChecks,
simplyTranslateTorRedirectsChecks: [...redirects.simplyTranslate.tor],
simplyTranslateI2pRedirectsChecks: [...redirects.simplyTranslate.i2p],
simplyTranslateLokiRedirectsChecks: [...redirects.simplyTranslate.loki],
lingvaNormalRedirectsChecks,
lingvaTorRedirectsChecks: redirects.lingva.tor,
lingvaTorRedirectsChecks: [...redirects.lingva.tor],
lingvaI2pRedirectsChecks: [...redirects.lingva.i2p],
lingvaLokiRedirectsChecks: [...redirects.lingva.loki],
})
})
}
@ -271,7 +277,7 @@ function switchInstance(url, disableOverride) {
return
}
let instancesList
let instancesList = []
if (protocol == "loki") {
if (translateFrontend == "simplyTranslate") instancesList = [...simplyTranslateLokiRedirectsChecks, ...simplyTranslateLokiCustomRedirects]
@ -304,16 +310,20 @@ function initDefaults() {
return new Promise(async resolve => {
fetch("/instances/data.json")
.then(response => response.text())
.then(data => {
.then(async data => {
let dataJson = JSON.parse(data)
for (let i = 0; i < frontends.length; i++) {
redirects[frontends[i]] = dataJson[frontends[i]]
}
browser.storage.local.get("cloudflareBlackList", async r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], async r => {
simplyTranslateNormalRedirectsChecks = [...redirects.simplyTranslate.normal]
lingvaNormalRedirectsChecks = [...redirects.lingva.normal]
for (const instance of r.cloudflareBlackList) {
const i = lingvaNormalRedirectsChecks.indexOf(instance)
if (i > -1) lingvaNormalRedirectsChecks.splice(i, 1)
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = simplyTranslateNormalRedirectsChecks.indexOf(instance)
if (a > -1) simplyTranslateNormalRedirectsChecks.splice(a, 1)
const b = lingvaNormalRedirectsChecks.indexOf(instance)
if (b > -1) lingvaNormalRedirectsChecks.splice(b, 1)
}
browser.storage.local.set(
{
@ -321,7 +331,7 @@ function initDefaults() {
translateFrontend: "simplyTranslate",
translateRedirects: redirects,
simplyTranslateNormalRedirectsChecks: [...redirects.simplyTranslate.normal],
simplyTranslateNormalRedirectsChecks,
simplyTranslateNormalCustomRedirects: [],
simplyTranslateTorRedirectsChecks: [...redirects.simplyTranslate.tor],
@ -333,7 +343,7 @@ function initDefaults() {
simplyTranslateLokiRedirectsChecks: [...redirects.simplyTranslate.loki],
simplyTranslateLokiCustomRedirects: [],
lingvaNormalRedirectsChecks: lingvaNormalRedirectsChecks,
lingvaNormalRedirectsChecks,
lingvaNormalCustomRedirects: [],
lingvaTorRedirectsChecks: [...redirects.lingva.tor],

View File

@ -17,10 +17,10 @@ for (let i = 0; i < frontends.length; i++) {
}
function setRedirects(val) {
browser.storage.local.get(["cloudflareBlackList", "authenticateBlackList"], r => {
browser.storage.local.get(["cloudflareBlackList", "authenticateBlackList", "offlineBlackList"], r => {
redirects.nitter = val
nitterNormalRedirectsChecks = [...redirects.nitter.normal]
for (const instance of [...r.cloudflareBlackList, ...r.authenticateBlackList]) {
for (const instance of [...r.cloudflareBlackList, ...r.authenticateBlackList, ...r.offlineBlackList]) {
let i = nitterNormalRedirectsChecks.indexOf(instance)
if (i > -1) nitterNormalRedirectsChecks.splice(i, 1)
}
@ -28,6 +28,8 @@ function setRedirects(val) {
twitterRedirects: redirects,
nitterNormalRedirectsChecks,
nitterTorRedirectsChecks: [...redirects.nitter.tor],
nitterI2pRedirectsChecks: [...redirects.nitter.i2p],
nitterLokiRedirectsChecks: [...redirects.nitter.loki],
})
})
}
@ -224,9 +226,9 @@ function initDefaults() {
for (let i = 0; i < frontends.length; i++) {
redirects[frontends[i]] = dataJson[frontends[i]]
}
browser.storage.local.get(["cloudflareBlackList", "authenticateBlackList"], async r => {
browser.storage.local.get(["cloudflareBlackList", "authenticateBlackList", "offlineBlackList"], async r => {
nitterNormalRedirectsChecks = [...redirects.nitter.normal]
for (const instance of [...r.cloudflareBlackList, ...r.authenticateBlackList]) {
for (const instance of [...r.cloudflareBlackList, ...r.authenticateBlackList, ...r.offlineBlackList]) {
let i = nitterNormalRedirectsChecks.indexOf(instance)
if (i > -1) nitterNormalRedirectsChecks.splice(i, 1)
}
@ -236,7 +238,7 @@ function initDefaults() {
twitterRedirects: redirects,
twitterRedirectType: "both",
nitterNormalRedirectsChecks: nitterNormalRedirectsChecks,
nitterNormalRedirectsChecks,
nitterNormalCustomRedirects: [],
nitterTorRedirectsChecks: [...redirects.nitter.tor],

View File

@ -25,7 +25,7 @@ function getRandomInstance(instances) {
let cloudflareBlackList = []
let authenticateBlackList = []
let offlineBlacklist = []
let offlineBlackList = []
async function initBlackList() {
return new Promise(resolve => {
fetch("/instances/blacklist.json")
@ -33,7 +33,7 @@ async function initBlackList() {
.then(data => {
cloudflareBlackList = JSON.parse(data).cloudflare
authenticateBlackList = JSON.parse(data).authenticate
offlineBlacklist = JSON.parse(data).offlineBlacklist
offlineBlackList = JSON.parse(data).offline
resolve()
})
})
@ -62,6 +62,7 @@ function updateInstances() {
invidious: instances.invidious,
piped: instances.piped,
pipedMaterial: instances.pipedMaterial,
cloudtube: instances.cloudtube,
})
twitterHelper.setRedirects(instances.nitter)
instagramHelper.setRedirects(instances.bibliogram)
@ -164,7 +165,7 @@ async function processDefaultCustomInstances(target, name, protocol, document) {
...redirects[name][protocol].map(x => {
const cloudflare = cloudflareBlackList.includes(x) ? ' <span style="color:red;">cloudflare</span>' : ""
const authenticate = authenticateBlackList.includes(x) ? ' <span style="color:orange;">authenticate</span>' : ""
const offline = offlineBlacklist.includes(x) ? ' <span style="color:grey;">offline</span>' : ""
const offline = offlineBlackList.includes(x) ? ' <span style="color:grey;">offline</span>' : ""
let ms = instancesLatency[x]
let latencyColor = ms <= 1000 ? "green" : ms <= 2000 ? "orange" : "red"
@ -250,34 +251,57 @@ async function processDefaultCustomInstances(target, name, protocol, document) {
})
}
async function ping(href) {
function ping(href) {
return new Promise(async resolve => {
let average = 0
let time
for (let i = 0; i < 3; i++) {
time = await pingOnce(href)
if (i == 0) continue
if (time >= 5000) {
resolve(time)
return
}
average += time
}
average = parseInt(average / 3)
resolve(average)
})
}
function pingOnce(href) {
return new Promise(async resolve => {
let started
let http = new XMLHttpRequest()
http.open("GET", `${href}?_=${new Date().getTime()}`, /*async*/ true)
http.timeout = 5000
let started = new Date().getTime()
http.ontimeout = () => resolve(5000)
http.onerror = () => resolve()
http.onreadystatechange = () => {
if (http.readyState == 2) {
if (http.status == 200) {
let ended = new Date().getTime()
http.abort()
resolve(ended - started)
} else resolve(5000 + http.status)
} else {
resolve(5000 + http.status)
}
}
}
http.ontimeout = () => resolve(5000)
http.onerror = () => resolve()
try {
http.send(null)
} catch (exception) {
resolve()
}
http.open("GET", `${href}?_=${new Date().getTime()}`, true)
started = new Date().getTime()
http.send(null)
})
}
async function testLatency(element, instances) {
async function testLatency(element, instances, frontend) {
return new Promise(async resolve => {
let myList = {}
let latencyThreshold
let redirectsChecks = []
browser.storage.local.get(["latencyThreshold", `${frontend}NormalRedirectsChecks`], r => {
latencyThreshold = r.latencyThreshold
redirectsChecks = r[`${frontend}NormalRedirectsChecks`]
})
for (const href of instances)
await ping(href).then(time => {
if (time) {
@ -287,6 +311,12 @@ async function testLatency(element, instances) {
else if (time <= 2000) color = "orange"
else color = "red"
if (time > latencyThreshold) {
redirectsChecks.splice(redirectsChecks.indexOf(href), 1)
}
browser.storage.local.set({ [`${frontend}NormalRedirectsChecks`]: redirectsChecks })
let text
if (time == 5000) text = "5000ms+"
else if (time > 5000) text = `ERROR: ${time - 5000}`
@ -486,8 +516,8 @@ function latency(name, frontend, document, location) {
let redirects = r[key]
const oldHtml = latencyLabel.innerHTML
latencyLabel.innerHTML = "..."
testLatency(latencyLabel, redirects[frontend].normal).then(r => {
browser.storage.local.set({ [`${frontend} Latency`]: r })
testLatency(latencyLabel, redirects[frontend].normal, frontend).then(r => {
browser.storage.local.set({ [`${frontend}Latency`]: r })
latencyLabel.innerHTML = oldHtml
processDefaultCustomInstances(name, frontend, "normal", document)
latencyElement.removeEventListener("click", reloadWindow)

View File

@ -17,16 +17,19 @@ for (let i = 0; i < frontends.length; i++) {
}
function setRedirects(val) {
browser.storage.local.get("cloudflareBlackList", r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], r => {
redirects.wikiless = val
wikilessNormalRedirectsChecks = [...redirects.wikiless.normal]
for (const instance of r.cloudflareBlackList) {
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = wikilessNormalRedirectsChecks.indexOf(instance)
if (a > -1) wikilessNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set({
wikipediaRedirects: redirects,
wikilessNormalRedirectsChecks,
wikilessTorRedirectsChecks: [...redirects.wikiless.tor],
wikilessI2pRedirectsChecks: [...redirects.wikiless.i2p],
wikilessLokiRedirectsChecks: [...redirects.wikiless.loki],
})
})
}
@ -200,18 +203,18 @@ function initDefaults() {
for (let i = 0; i < frontends.length; i++) {
redirects[frontends[i]] = dataJson[frontends[i]]
}
browser.storage.local.get("cloudflareBlackList", async r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], async r => {
wikilessNormalRedirectsChecks = [...redirects.wikiless.normal]
for (const instance of r.cloudflareBlackList) {
let i = wikilessNormalRedirectsChecks.indexOf(instance)
if (i > -1) wikilessNormalRedirectsChecks.splice(i, 1)
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = wikilessNormalRedirectsChecks.indexOf(instance)
if (a > -1) wikilessNormalRedirectsChecks.splice(a, 1)
}
browser.storage.local.set(
{
disableWikipedia: true,
wikipediaRedirects: redirects,
wikilessNormalRedirectsChecks: wikilessNormalRedirectsChecks,
wikilessNormalRedirectsChecks,
wikilessNormalCustomRedirects: [],
wikilessTorRedirectsChecks: [...redirects.wikiless.tor],

View File

@ -30,14 +30,13 @@ for (let i = 0; i < frontends.length; i++) {
}
function setRedirects(val) {
browser.storage.local.get("cloudflareBlackList", r => {
for (let i = 0; i < frontends.length; i++) {
redirects.frontends = val.frontends
}
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], r => {
redirects = val
invidiousNormalRedirectsChecks = [...redirects.invidious.normal]
pipedNormalRedirectsChecks = [...redirects.piped.normal]
pipedMaterialNormalRedirectsChecks = [...redirects.pipedMaterial.normal]
for (const instance of r.cloudflareBlackList) {
cloudtubeNormalRedirectsChecks = [...redirects.cloudtube.normal]
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = invidiousNormalRedirectsChecks.indexOf(instance)
if (a > -1) invidiousNormalRedirectsChecks.splice(a, 1)
@ -53,9 +52,21 @@ function setRedirects(val) {
browser.storage.local.set({
youtubeRedirects: redirects,
invidiousNormalRedirectsChecks,
invidiousTorRedirectsChecks: [...redirects.invidious.tor],
invidiousI2pRedirectsChecks: [...redirects.invidious.i2p],
invidiousLokiRedirectsChecks: [...redirects.invidious.loki],
pipedNormalRedirectsChecks,
pipedTorRedirectsChecks: [...redirects.piped.tor],
pipedI2pRedirectsChecks: [...redirects.piped.i2p],
pipedLokiRedirectsChecks: [...redirects.piped.loki],
pipedMaterialNormalRedirectsChecks,
pipedMaterialTorRedirectsChecks: [...redirects.pipedMaterial.tor],
pipedMaterialI2pRedirectsChecks: [...redirects.pipedMaterial.i2p],
pipedMaterialLokiRedirectsChecks: [...redirects.pipedMaterial.loki],
cloudtubeNormalRedirectsChecks,
cloudtubeTorRedirectsChecks: [...redirects.cloudtube.tor],
cloudtubeI2pRedirectsChecks: [...redirects.cloudtube.i2p],
cloudtubeLokiRedirectsChecks: [...redirects.cloudtube.loki],
})
})
}
@ -450,13 +461,12 @@ function initDefaults() {
for (let i = 0; i < frontends.length; i++) {
redirects[frontends[i]] = dataJson[frontends[i]]
}
browser.storage.local.get("cloudflareBlackList", async r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], async r => {
invidiousNormalRedirectsChecks = [...redirects.invidious.normal]
pipedNormalRedirectsChecks = [...redirects.piped.normal]
pipedMaterialNormalRedirectsChecks = [...redirects.pipedMaterial.normal]
cloudtubeNormalRedirectsChecks = [...redirects.cloudtube.normal]
for (const instance of r.cloudflareBlackList) {
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = invidiousNormalRedirectsChecks.indexOf(instance)
if (a > -1) invidiousNormalRedirectsChecks.splice(a, 1)
@ -467,9 +477,8 @@ function initDefaults() {
if (c > -1) pipedMaterialNormalRedirectsChecks.splice(c, 1)
const d = cloudtubeNormalRedirectsChecks.indexOf(instance)
if (d > -1) cloudtubeNormalRedirectsChecks.indexOf(instance)
if (c > -1) cloudtubeNormalRedirectsChecks.splice(d, 1)
}
browser.storage.local.set(
{
disableYoutube: false,
@ -478,7 +487,7 @@ function initDefaults() {
youtubeRedirects: redirects,
youtubeFrontend: "invidious",
invidiousNormalRedirectsChecks: invidiousNormalRedirectsChecks,
invidiousNormalRedirectsChecks,
invidiousNormalCustomRedirects: [],
invidiousTorRedirectsChecks: [...redirects.invidious.tor],
@ -490,7 +499,7 @@ function initDefaults() {
invidiousLokiRedirectsChecks: [...redirects.invidious.loki],
invidiousLokiCustomRedirects: [],
pipedNormalRedirectsChecks: pipedNormalRedirectsChecks,
pipedNormalRedirectsChecks,
pipedNormalCustomRedirects: [],
pipedTorRedirectsChecks: [...redirects.piped.tor],

View File

@ -19,11 +19,11 @@ for (let i = 0; i < frontends.length; i++) {
}
function setRedirects(val) {
browser.storage.local.get("cloudflareBlackList", r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], r => {
redirects = val
beatbumpNormalRedirectsChecks = [...redirects.beatbump.normal]
hyperpipeNormalRedirectsChecks = [...redirects.hyperpipe.normal]
for (const instance of r.cloudflareBlackList) {
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = beatbumpNormalRedirectsChecks.indexOf(instance)
if (a > -1) beatbumpNormalRedirectsChecks.splice(a, 1)
@ -33,7 +33,13 @@ function setRedirects(val) {
browser.storage.local.set({
youtubeMusicRedirects: redirects,
beatbumpNormalRedirectsChecks,
beatbumpTorRedirectsChecks: [...redirects.beatbump.tor],
beatbumpI2pRedirectsChecks: [...redirects.beatbump.i2p],
beatbumpLokiRedirectsChecks: [...redirects.beatbump.loki],
hyperpipeNormalRedirectsChecks,
hyperpipeTorRedirectsChecks: [...redirects.hyperpipe.tor],
hyperpipeI2pRedirectsChecks: [...redirects.hyperpipe.i2p],
hyperpipeLokiRedirectsChecks: [...redirects.hyperpipe.loki],
})
})
}
@ -266,17 +272,15 @@ function initDefaults() {
for (let i = 0; i < frontends.length; i++) {
redirects[frontends[i]] = dataJson[frontends[i]]
}
browser.storage.local.get("cloudflareBlackList", async r => {
browser.storage.local.get(["cloudflareBlackList", "offlineBlackList"], async r => {
beatbumpNormalRedirectsChecks = [...redirects.beatbump.normal]
hyperpipeNormalRedirectsChecks = [...redirects.hyperpipe.normal]
for (const instance of r.cloudflareBlackList) {
let i
for (const instance of [...r.cloudflareBlackList, ...r.offlineBlackList]) {
const a = beatbumpNormalRedirectsChecks.indexOf(instance)
if (a > -1) beatbumpNormalRedirectsChecks.splice(a, 1)
i = beatbumpNormalRedirectsChecks.indexOf(instance)
if (i > -1) beatbumpNormalRedirectsChecks.splice(i, 1)
i = hyperpipeNormalRedirectsChecks.indexOf(instance)
if (i > -1) hyperpipeNormalRedirectsChecks.splice(i, 1)
const b = hyperpipeNormalRedirectsChecks.indexOf(instance)
if (b > -1) hyperpipeNormalRedirectsChecks.splice(b, 1)
}
browser.storage.local.set(
{
@ -284,7 +288,7 @@ function initDefaults() {
youtubeMusicFrontend: "hyperpipe",
youtubeMusicRedirects: redirects,
beatbumpNormalRedirectsChecks: beatbumpNormalRedirectsChecks,
beatbumpNormalRedirectsChecks,
beatbumpNormalCustomRedirects: [],
beatbumpTorRedirectsChecks: [...redirects.beatbump.tor],
@ -296,7 +300,7 @@ function initDefaults() {
beatbumpLokiRedirectsChecks: [...redirects.beatbump.loki],
beatbumpLokiCustomRedirects: [],
hyperpipeNormalRedirectsChecks: hyperpipeNormalRedirectsChecks,
hyperpipeNormalRedirectsChecks,
hyperpipeNormalCustomRedirects: [],
hyperpipeTorRedirectsChecks: [...redirects.hyperpipe.tor],

View File

@ -4,9 +4,8 @@
"https://piped.kavin.rocks",
"https://piped.tokhmi.xyz",
"https://piped.moomoo.me",
"https://piped.syncpundit.com",
"https://piped.mha.fi",
"https://jp-piped.shimul.me",
"https://de-piped.shimul.me",
"https://pipedus.palash.dev",
"https://piped.waffle.wiki",
"https://watch.whatever.social",
@ -68,7 +67,6 @@
"https://jsearch.pw",
"https://searx.gnu.style",
"https://searx.semipvt.com",
"https://searx.vanwa.tech",
"https://etsi.me",
"https://s.zhaocloud.net",
"https://search.vidhukant.xyz",

View File

@ -12,6 +12,7 @@
"https://invidious.sethforprivacy.com",
"https://invidious.tiekoetter.com",
"https://inv.bp.projectsegfau.lt",
"https://invidious.projectsegfau.lt",
"https://inv.vern.cc",
"https://invidious.nerdvpn.de",
"https://inv.privacy.com.de",
@ -19,7 +20,6 @@
"https://youtube.076.ne.jp",
"https://invidious.weblibre.org",
"https://invidious.snopyta.org",
"https://invidious.projectsegfau.lt",
"https://invidious.esmailelbob.xyz",
"https://invidious.namazso.eu"
],
@ -43,13 +43,13 @@
"https://piped.tokhmi.xyz",
"https://piped.moomoo.me",
"https://il.ax",
"https://piped.syncpundit.com",
"https://piped.mha.fi",
"https://jp-piped.shimul.me",
"https://de-piped.shimul.me",
"https://pipedus.palash.dev",
"https://piped.waffle.wiki",
"https://watch.whatever.social",
"https://yt.jae.fi",
"https://piped.mint.lgbt",
"https://piped.esmailelbob.xyz",
"https://piped.projectsegfau.lt"
],
@ -501,7 +501,6 @@
"https://searx.tuxcloud.net",
"https://searx.tyil.nl",
"https://searx.vanwa.tech",
"https://searx.vimproved.me",
"https://searx.webheberg.info",
"https://searx.xyz",
"https://searx.zapashcanon.fr",
@ -519,8 +518,7 @@
"http://yra4tke2pwcnatxjkufpw6kvebu3h3ti2jca2lcdpgx3mpwol326lzid.onion",
"http://z5vawdol25vrmorm4yydmohsd4u6rdoj2sylvoi3e3nqvxkvpqul7bqd.onion",
"http://zbuc3bbzbfdqqo2x46repx2ddajbha6fpsjeeptjhhhhzji3zopxdqyd.onion",
"http://f4qfqajszpx5b7itzxt6mb7kj4ktpgbdq7lq6xaiqyqx6a7de3epptad.onion",
"http://searx.micohauwkjbyw5meacrb4ipicwvwg4xtzl7y7viv53kig2mdcsvwkyyd.onion"
"http://f4qfqajszpx5b7itzxt6mb7kj4ktpgbdq7lq6xaiqyqx6a7de3epptad.onion"
],
"i2p": [
"http://ransack.i2p",
@ -582,6 +580,7 @@
"https://searx.sev.monster",
"https://searx.slipfox.xyz/searx",
"https://searx.tiekoetter.com",
"https://searx.vimproved.me",
"https://searx.zcyph.cc",
"https://searxng.au/searx",
"https://searxng.tordenskjold.de",
@ -603,6 +602,7 @@
"http://searchoorwalty5a2ailrboa2asqyts2u7bdoqwnjefpgjobpvtzn4qd.onion",
"http://gbat2pbpg7ys3fi3pbp64667tt5x66mg45xok35bxdw7v55brm7a27yd.onion",
"http://searxdr3pqz4nydgnqocsia2xbywptxbkympa2emn7zlgggrir4bkfad.onion",
"http://searx.micohauwkjbyw5meacrb4ipicwvwg4xtzl7y7viv53kig2mdcsvwkyyd.onion",
"http://searx.privpw3tndpkw6pnp3g727zfgfdzbu3k6a7chv226s3xymv2p4eiuqyd.onion",
"http://rq2w52kyrif3xpfihkgjnhqm3a5aqhoikpv72z3drpjglfzc2wr5z4yd.onion",
"http://fub6vgedgeadlu3ctskrpkcqjruh76tckwtj5swfhyblgml2tzgzckqd.onion/searx",
@ -820,7 +820,6 @@
"https://tube-enseignement-professionnel.apps.education.fr",
"https://socpeertube.ru",
"https://videos.laliguepaysdelaloire.org",
"https://videotube.duckdns.org",
"https://quantube.win",
"https://twctube.twc-zone.eu",
"https://vhs.absturztau.be",

View File

@ -92,7 +92,7 @@ def is_authenticate(url):
def is_offline(url):
try:
r = requests.get(url, timeout=5)
if r.status_code != 200:
if r.status_code >= 400:
print(url + ' is ' + Fore.RED + 'offline' + Style.RESET_ALL)
print("Status code")
print(r.status_code)

View File

@ -32,25 +32,27 @@ browser.runtime.onInstalled.addListener(details => {
browser.storage.local.clear(() => {
browser.storage.local.set({ cloudflareBlackList: JSON.parse(data).cloudflare }, () => {
browser.storage.local.set({ authenticateBlackList: JSON.parse(data).authenticate }, () => {
generalHelper.initDefaults()
youtubeHelper.initDefaults()
youtubeMusicHelper.initDefaults()
twitterHelper.initDefaults()
instagramHelper.initDefaults()
mapsHelper.initDefaults()
searchHelper.initDefaults()
translateHelper.initDefaults()
mediumHelper.initDefaults()
quoraHelper.initDefaults()
libremdbHelper.initDefaults()
reutersHelper.initDefaults()
redditHelper.initDefaults()
wikipediaHelper.initDefaults()
imgurHelper.initDefaults()
tiktokHelper.initDefaults()
sendTargetsHelper.initDefaults()
peertubeHelper.initDefaults()
lbryHelper.initDefaults()
browser.storage.local.set({ offlineBlackList: JSON.parse(data).offline }, () => {
generalHelper.initDefaults()
youtubeHelper.initDefaults()
youtubeMusicHelper.initDefaults()
twitterHelper.initDefaults()
instagramHelper.initDefaults()
mapsHelper.initDefaults()
searchHelper.initDefaults()
translateHelper.initDefaults()
mediumHelper.initDefaults()
quoraHelper.initDefaults()
libremdbHelper.initDefaults()
reutersHelper.initDefaults()
redditHelper.initDefaults()
wikipediaHelper.initDefaults()
imgurHelper.initDefaults()
tiktokHelper.initDefaults()
sendTargetsHelper.initDefaults()
peertubeHelper.initDefaults()
lbryHelper.initDefaults()
})
})
})
})

View File

@ -21,7 +21,7 @@
<div class="title"> <img src="../../../assets/images/instagram-icon.png"><a href="#instagram" data-localise="__MSG_instagram__">Instagram</a></div>
<div class="title"> <img src="../../../assets/images/tiktok-icon.png"><a href="#tiktok" data-localise="__MSG_tiktok__">TikTok</a></div>
<div class="title"> <img src="../../../assets/images/reddit-icon.png"><a href="#reddit" data-localise="__MSG_reddit__">Reddit</a></div>
<div class="title"> <img src="../../../assets/images/imgur-icon.png"><a href="#imgur" data-localise="__MSG_imgur__">Imgur</a></div>
<div class="title"> <img src="../../../assets/images/imgur.png"><a href="#imgur" data-localise="__MSG_imgur__">Imgur</a></div>
<div class="title"> <img src="../../../assets/images/wikipedia-icon.svg"><a href="#wikipedia" data-localise="__MSG_wikipedia__">Wikipedia</a></div>
<div class="title">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1770 1000" fill="currentColor">
@ -34,7 +34,7 @@
<div class="title"><img src="../../../assets/images/imdb.svg"><a href="#imdb" data-localise="__MSG_imdb__">IMDb</a></div>
<div class="title"><img src="../../../assets/images/reuters.svg"><a href="#reuters" data-localise="__MSG_reuters__">Reuters</a></div>
<div class="title"> <img src="../../../assets/images/peertube-icon.svg"><a href="#peertube" data-localise="__MSG_peertube__">PeerTube</a></div>
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="#lbry" data-localise="__MSG_lbry__">LBRY/Odysee</a></div>
<div class="title"> <img src="../../../assets/images/lbry-icon.png"><a href="#lbry" data-localise="__MSG_lbry__">LBRY</a></div>
<div class="title">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
<path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path>
@ -94,6 +94,13 @@
<h4 data-localise="__MSG_autoRedirect__"></h4>
<input id="auto-redirect" type="checkbox">
</div>
<form>
<div class="some-block option-block">
<h4 data-localise="__MSG_latencyThreshold">Latency Threshold</h4>
<output id="latency-output" for="latencyInput" name="latencyOutput"></output>
<input id="latency-input" type="range" min="50" max="5000" value="1000" name="latencyInput" step="50">
</div>
</form>
<div class="some-block option-block">
<h4 data-localise="__MSG_exceptions__"></h4>
</div>
@ -173,7 +180,7 @@
<input id="tiktok" type="checkbox">
</div>
<div>
<div> <img src="../../../assets/images/imgur-icon.png">
<div> <img src="../../../assets/images/imgur.png">
<x data-localise="__MSG_imgur__">Imgur</x>
</div>
<input id="imgur" type="checkbox">
@ -254,7 +261,7 @@
</div>
<div>
<div> <img src="../../../assets/images/lbry-icon.png">
<x data-localise="__MSG_lbry__">LBRY/Odysee</x>
<x data-localise="__MSG_lbry__">LBRY</x>
</div>
<input id="lbry" type="checkbox">
</div>
@ -3179,4 +3186,4 @@
</div>
</body>
<script type="module" src="./index.js"></script>
</html>
</html>

View File

@ -33,4 +33,4 @@ html#elementToShowWithJavaScript(lang="en")
include ./widgets/sendTargets.pug
include ./widgets/about.pug
script(type="module" src="./index.js")
script(type="module" src="./index.js")

View File

@ -81,6 +81,7 @@ resetSettings.addEventListener("click", async () => {
.then(response => response.text())
.then(async data => {
browser.storage.local.set({ cloudflareBlackList: JSON.parse(data).cloudflare }, () => {
browser.storage.local.set({ offlineBlackList: JSON.parse(data).offline }, () => {
browser.storage.local.set({ authenticateBlackList: JSON.parse(data).authenticate }, async () => {
await generalHelper.initDefaults()
await youtubeHelper.initDefaults()
@ -103,6 +104,7 @@ resetSettings.addEventListener("click", async () => {
await lbryHelper.initDefaults()
location.reload()
})
})
})
})
})
@ -132,14 +134,14 @@ protocolFallbackCheckbox.addEventListener("change", event => {
browser.storage.local.set({ protocolFallback: event.target.checked })
})
// let latencyOutput = document.getElementById("latency-output")
// let latencyInput = document.getElementById("latency-input")
// latencyInput.addEventListener("change", event => {
// browser.storage.local.set({ latencyThreshold: event.target.value })
// })
// latencyInput.addEventListener("input", event => {
// latencyOutput.value = event.target.value
// })
let latencyOutput = document.getElementById("latency-output")
let latencyInput = document.getElementById("latency-input")
latencyInput.addEventListener("change", event => {
browser.storage.local.set({ latencyThreshold: event.target.value })
})
latencyInput.addEventListener("input", event => {
latencyOutput.value = event.target.value
})
let nameCustomInstanceInput = document.getElementById("exceptions-custom-instance")
let instanceTypeElement = document.getElementById("exceptions-custom-instance-type")
@ -174,7 +176,7 @@ browser.storage.local.get(
themeElement.value = r.theme
protocolElement.value = r.protocol
protocolFallbackCheckbox.checked = r.protocolFallback
// latencyOutput.value = r.latencyThreshold
latencyOutput.value = r.latencyThreshold
// firstPartyIsolate.checked = r.firstPartyIsolate;
let protocolFallbackElement = document.getElementById("protocol-fallback")

View File

@ -31,6 +31,12 @@ section#general_page.option-block
h4(data-localise="__MSG_autoRedirect__")
input#auto-redirect(type="checkbox")
form
.some-block.option-block
h4(data-localise="__MSG_latencyThreshold") Latency Threshold
output#latency-output(for="latencyInput" name="latencyOutput")
input#latency-input(type="range" min="50" max="5000" value="1000" name="latencyInput" step="50")
.some-block.option-block
h4(data-localise="__MSG_exceptions__")
@ -117,7 +123,7 @@ section#general_page.option-block
div
div
img(src="../../../assets/images/imgur-icon.png")
img(src="../../../assets/images/imgur.png")
x(data-localise="__MSG_imgur__") Imgur
input#imgur(type="checkbox")
@ -190,7 +196,7 @@ section#general_page.option-block
div
div
img(src="../../../assets/images/lbry-icon.png")
x(data-localise="__MSG_lbry__") LBRY/Odysee
x(data-localise="__MSG_lbry__") LBRY
input#lbry(type="checkbox")
div

View File

@ -28,7 +28,7 @@
<h4 data-localise="__MSG_tiktok__">TikTok</h4></a>
<input class="disable-tiktok" type="checkbox"/>
</div>
<div class="imgur some-block"><a class="title" href="https://imgur.com"><img src="../../assets/images/imgur-icon.png"/>
<div class="imgur some-block"><a class="title" href="https://imgur.com"><img src="../../assets/images/imgur.png"/>
<h4 data-localise="__MSG_imgur__">Imgur</h4></a>
<input class="disable-imgur" type="checkbox"/>
</div>
@ -122,7 +122,7 @@
<h4 data-localise="__MSG_tiktok__">TikTok</h4></a>
<input class="disable-tiktok" type="checkbox"/>
</div>
<div class="imgur some-block"><a class="title" href="https://imgur.com"><img src="../../assets/images/imgur-icon.png"/>
<div class="imgur some-block"><a class="title" href="https://imgur.com"><img src="../../assets/images/imgur.png"/>
<h4 data-localise="__MSG_imgur__">Imgur</h4></a>
<input class="disable-imgur" type="checkbox"/>
</div>

View File

@ -33,7 +33,7 @@ mixin services
.imgur.some-block
a.title(href="https://imgur.com")
img(src="../../assets/images/imgur-icon.png")
img(src="../../assets/images/imgur.png")
h4(data-localise="__MSG_imgur__") Imgur
input.disable-imgur(type="checkbox")