Merge branch 'master' of https://github.com/libredirect/browser_extension
このコミットが含まれているのは:
コミット
de22e83722
|
@ -435,6 +435,13 @@ function redirect(url, type, initiator, forceRedirection) {
|
||||||
if (url.pathname.endsWith('-lyrics')) {
|
if (url.pathname.endsWith('-lyrics')) {
|
||||||
return `${randomInstance}${url.pathname}`
|
return `${randomInstance}${url.pathname}`
|
||||||
}
|
}
|
||||||
|
return `${randomInstance}${url.pathname}${url.search}`
|
||||||
|
}
|
||||||
|
case "intellectual": {
|
||||||
|
if (url.pathname.endsWith('-lyrics')) {
|
||||||
|
return `${randomInstance}/lyrics?path=${encodeURIComponent(url.pathname)}`
|
||||||
|
}
|
||||||
|
return `${randomInstance}${url.pathname}${url.search}`
|
||||||
}
|
}
|
||||||
case "ruralDictionary": {
|
case "ruralDictionary": {
|
||||||
if (!url.pathname.includes('/define.php') && !url.pathname.includes('/random.php') && url.pathname != '/') return randomInstance
|
if (!url.pathname.includes('/define.php') && !url.pathname.includes('/random.php') && url.pathname != '/') return randomInstance
|
||||||
|
@ -472,12 +479,18 @@ function redirect(url, type, initiator, forceRedirection) {
|
||||||
return `${randomInstance}${url.pathname}${url.search}`
|
return `${randomInstance}${url.pathname}${url.search}`
|
||||||
}
|
}
|
||||||
case "waybackClassic": {
|
case "waybackClassic": {
|
||||||
const regex = /^\/\web\/[0-9]+\*\/(.*)/.exec(url.pathname)
|
const regex = /^\/\web\/(?:[0-9]+)?\*\/(.*)/.exec(url.pathname)
|
||||||
if (regex) {
|
if (regex) {
|
||||||
const link = regex[1]
|
const link = regex[1]
|
||||||
return `${randomInstance}/cgi-bin/history.cgi?utf8=✓&q=${encodeURIComponent(link)}`
|
return `${randomInstance}/cgi-bin/history.cgi?utf8=✓&q=${encodeURIComponent(link)}`
|
||||||
}
|
}
|
||||||
return `${randomInstance}`
|
const regex2 = /(^\/\web\/([0-9]+)\/.*)/.exec(url.pathname)
|
||||||
|
if (regex2) {
|
||||||
|
let link = regex2[1]
|
||||||
|
link = link.replace(regex2[2], regex2[2] + 'if_')
|
||||||
|
return `https://web.archive.org${link}`
|
||||||
|
}
|
||||||
|
return
|
||||||
}
|
}
|
||||||
case "gothub": {
|
case "gothub": {
|
||||||
const regex = /^\/(.*)\/(.*)\/(?:blob|tree)\/(.*)\/(.*)/.exec(url.pathname)
|
const regex = /^\/(.*)\/(.*)\/(?:blob|tree)\/(.*)\/(.*)/.exec(url.pathname)
|
||||||
|
@ -707,6 +720,7 @@ const defaultInstances = {
|
||||||
'breezeWiki': ['https://breezewiki.com'],
|
'breezeWiki': ['https://breezewiki.com'],
|
||||||
'neuters': ['https://neuters.de'],
|
'neuters': ['https://neuters.de'],
|
||||||
'dumb': ['https://dm.vern.cc'],
|
'dumb': ['https://dm.vern.cc'],
|
||||||
|
"intellectual": ['https://intellectual.insprill.net'],
|
||||||
'ruralDictionary': ['https://rd.vern.cc'],
|
'ruralDictionary': ['https://rd.vern.cc'],
|
||||||
'anonymousOverflow': ['https://code.whatever.social'],
|
'anonymousOverflow': ['https://code.whatever.social'],
|
||||||
'biblioReads': ['https://biblioreads.ml'],
|
'biblioReads': ['https://biblioreads.ml'],
|
||||||
|
|
|
@ -618,6 +618,12 @@
|
||||||
"instanceList": true,
|
"instanceList": true,
|
||||||
"url": "https://github.com/rramiachraf/dumb",
|
"url": "https://github.com/rramiachraf/dumb",
|
||||||
"localhost": true
|
"localhost": true
|
||||||
|
},
|
||||||
|
"intellectual": {
|
||||||
|
"name": "Intellectual",
|
||||||
|
"instanceList": true,
|
||||||
|
"url": "https://github.com/Insprill/intellectual",
|
||||||
|
"localhost": false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
|
|
読み込み中…
新しいイシューから参照