This commit is contained in:
parent
69ac9e6334
commit
31c642fc90
|
@ -107,7 +107,15 @@ function redirect(url, type) {
|
||||||
// https://imgur.com/gallery/cTRwaJU
|
// https://imgur.com/gallery/cTRwaJU
|
||||||
// https://i.imgur.com/CFSQArP.jpeg
|
// https://i.imgur.com/CFSQArP.jpeg
|
||||||
|
|
||||||
if (type != "main_frame" && type != "sub_frame" && type != "xmlhttprequest" && type != "other") return null;
|
if (![
|
||||||
|
"main_frame",
|
||||||
|
"sub_frame",
|
||||||
|
"xmlhttprequest",
|
||||||
|
"other",
|
||||||
|
"image",
|
||||||
|
"media",
|
||||||
|
].includes(type)) return null;
|
||||||
|
|
||||||
if (url.pathname.includes("delete/")) return null;
|
if (url.pathname.includes("delete/")) return null;
|
||||||
|
|
||||||
let instancesList;
|
let instancesList;
|
||||||
|
|
|
@ -2,7 +2,7 @@ window.browser = window.browser || window.chrome;
|
||||||
|
|
||||||
import commonHelper from './common.js'
|
import commonHelper from './common.js'
|
||||||
|
|
||||||
const targets = /^https?:\/{2}(.*\.|)wikipedia\.org/
|
const targets = /^https?:\/{2}([a-z]{1,}\.|)wikipedia\.org/
|
||||||
|
|
||||||
let redirects = {
|
let redirects = {
|
||||||
"wikiless": {
|
"wikiless": {
|
||||||
|
|
|
@ -108,9 +108,12 @@ rJson = json.loads(r.text)
|
||||||
wikilessList = {}
|
wikilessList = {}
|
||||||
wikilessList['normal'] = []
|
wikilessList['normal'] = []
|
||||||
wikilessList['tor'] = []
|
wikilessList['tor'] = []
|
||||||
|
wikilessList['i2p'] = []
|
||||||
for item in rJson:
|
for item in rJson:
|
||||||
if item.endswith('.onion'):
|
if item.endswith('.onion'):
|
||||||
wikilessList['tor'].append('http://' + item)
|
wikilessList['tor'].append('http://' + item)
|
||||||
|
elif item.endswith('.i2p'):
|
||||||
|
wikilessList['i2p'].append('http://' + item)
|
||||||
else:
|
else:
|
||||||
wikilessList['normal'].append('https://' + item)
|
wikilessList['normal'].append('https://' + item)
|
||||||
mightyList['wikiless'] = wikilessList
|
mightyList['wikiless'] = wikilessList
|
||||||
|
|
Loading…
Reference in New Issue