Hopefully fixing https://github.com/libredirect/browser_extension/issues/765
This commit is contained in:
parent
22da045041
commit
16e4473a2c
|
@ -58,13 +58,6 @@ function redirect(url, type, initiator, forceRedirection) {
|
||||||
|
|
||||||
frontend = options[service].frontend
|
frontend = options[service].frontend
|
||||||
|
|
||||||
if (
|
|
||||||
config.services[service].embeddable &&
|
|
||||||
type != options[service].redirectType && options[service].redirectType != "both"
|
|
||||||
) {
|
|
||||||
if (options[service].unsupportedUrls == 'block') return 'CANCEL'
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config.services[service].frontends[frontend].desktopApp && type != "main_frame" && options[service].redirectType != "main_frame")
|
if (config.services[service].frontends[frontend].desktopApp && type != "main_frame" && options[service].redirectType != "main_frame")
|
||||||
frontend = options[service].embedFrontend
|
frontend = options[service].embedFrontend
|
||||||
|
@ -75,6 +68,14 @@ function redirect(url, type, initiator, forceRedirection) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
config.services[service].embeddable &&
|
||||||
|
type != options[service].redirectType && options[service].redirectType != "both"
|
||||||
|
) {
|
||||||
|
if (options[service].unsupportedUrls == 'block') return 'CANCEL'
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
let instanceList = options[frontend]
|
let instanceList = options[frontend]
|
||||||
if (instanceList === undefined) break
|
if (instanceList === undefined) break
|
||||||
if (instanceList.length === 0) return null
|
if (instanceList.length === 0) return null
|
||||||
|
|
|
@ -120,7 +120,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
"^https?:\\/{2}music\\.youtube\\.com(\\/|$)"
|
"^https?:\\/{2}music\\.youtube\\.com\\/"
|
||||||
],
|
],
|
||||||
"name": "YT Music",
|
"name": "YT Music",
|
||||||
"options": {
|
"options": {
|
||||||
|
@ -141,11 +141,11 @@
|
||||||
"localhost": true
|
"localhost": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
"^https?:\\/{2}(www\\.|mobile\\.)?twitter\\.com(\\/|$)",
|
"^https?:\\/{2}(www\\.|mobile\\.)?twitter\\.com\\/",
|
||||||
"^https?:\\/{2}(pbs\\.|video\\.)twimg\\.com(\\/|$)",
|
"^https?:\\/{2}(pbs\\.|video\\.)twimg\\.com\\/",
|
||||||
"^https?:\\/{2}platform\\.twitter\\.com/embed(\\/|$)",
|
"^https?:\\/{2}platform\\.twitter\\.com/embed\\/",
|
||||||
"^https?:\\/{2}t\\.co(\\/|$)"
|
"^https?:\\/{2}t\\.co\\/"
|
||||||
],
|
],
|
||||||
"name": "Twitter",
|
"name": "Twitter",
|
||||||
"options": {
|
"options": {
|
||||||
|
@ -169,7 +169,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
"^https?:\\/{2}(www\\.)?tiktok\\.com(\\/|$)"
|
"^https?:\\/{2}(www\\.)?tiktok\\.com\\/"
|
||||||
],
|
],
|
||||||
"name": "TikTok",
|
"name": "TikTok",
|
||||||
"options": {
|
"options": {
|
||||||
|
@ -221,7 +221,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
"^https?:\\/{2}([im]\\.)?(stack\\.)?imgur\\.(com|io)(\\/|$)"
|
"^https?:\\/{2}([im]\\.)?(stack\\.)?imgur\\.(com|io)\\/"
|
||||||
],
|
],
|
||||||
"name": "Imgur",
|
"name": "Imgur",
|
||||||
"options": {
|
"options": {
|
||||||
|
@ -269,25 +269,25 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
"^https:\\/{2}([a-zA-Z0-9_-]+\\.)?medium\\.com",
|
"^https:\\/{2}([a-zA-Z0-9-]+\\.)?medium\\.com",
|
||||||
"^https?:\\/{2}towardsdatascience\\.com(\\/|$)",
|
"^https?:\\/{2}towardsdatascience\\.com\\/",
|
||||||
"^https?:\\/{2}uxdesign\\.cc(\\/|$)",
|
"^https?:\\/{2}uxdesign\\.cc\\/",
|
||||||
"^https?:\\/{2}uxplanet\\.org(\\/|$)",
|
"^https?:\\/{2}uxplanet\\.org\\/",
|
||||||
"^https?:\\/{2}betterprogramming\\.pub(\\/|$)",
|
"^https?:\\/{2}betterprogramming\\.pub\\/",
|
||||||
"^https?:\\/{2}aninjusticemag\\.com(\\/|$)",
|
"^https?:\\/{2}aninjusticemag\\.com\\/",
|
||||||
"^https?:\\/{2}betterhumans\\.pub(\\/|$)",
|
"^https?:\\/{2}betterhumans\\.pub\\/",
|
||||||
"^https?:\\/{2}psiloveyou\\.xyz(\\/|$)",
|
"^https?:\\/{2}psiloveyou\\.xyz\\/",
|
||||||
"^https?:\\/{2}entrepreneurshandbook\\.co(\\/|$)",
|
"^https?:\\/{2}entrepreneurshandbook\\.co\\/",
|
||||||
"^https?:\\/{2}blog\\.coinbase\\.com(\\/|$)",
|
"^https?:\\/{2}blog\\.coinbase\\.com\\/",
|
||||||
"^https?:\\/{2}levelup\\.gitconnected\\.com(\\/|$)",
|
"^https?:\\/{2}levelup\\.gitconnected\\.com\\/",
|
||||||
"^https?:\\/{2}javascript\\.plainenglish\\.io(\\/|$)",
|
"^https?:\\/{2}javascript\\.plainenglish\\.io\\/",
|
||||||
"^https?:\\/{2}blog\\.bitsrc\\.io(\\/|$)",
|
"^https?:\\/{2}blog\\.bitsrc\\.io\\/",
|
||||||
"^https?:\\/{2}itnext\\.io(\\/|$)",
|
"^https?:\\/{2}itnext\\.io\\/",
|
||||||
"^https?:\\/{2}codeburst\\.io(\\/|$)",
|
"^https?:\\/{2}codeburst\\.io\\/",
|
||||||
"^https?:\\/{2}infosecwriteups\\.com(\\/|$)",
|
"^https?:\\/{2}infosecwriteups\\.com\\/",
|
||||||
"^https?:\\/{2}blog\\.devgenius\\.io(\\/|$)",
|
"^https?:\\/{2}blog\\.devgenius\\.io\\/",
|
||||||
"^https?:\\/{2}writingcooperative\\.com(\\/|$)",
|
"^https?:\\/{2}writingcooperative\\.com\\/",
|
||||||
"^https?:\\/{2}proandroiddev\\.com(\\/|$)"
|
"^https?:\\/{2}proandroiddev\\.com\\/"
|
||||||
],
|
],
|
||||||
"name": "Medium",
|
"name": "Medium",
|
||||||
"options": {
|
"options": {
|
||||||
|
@ -308,7 +308,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
"^https?:\\/{2}([a-zA-Z0-9-]+\\.)*quora\\.com(\\/|$)"
|
"^https?:\\/{2}([a-zA-Z0-9-]+\\.)*quora\\.com\\/"
|
||||||
],
|
],
|
||||||
"name": "Quora",
|
"name": "Quora",
|
||||||
"options": {
|
"options": {
|
||||||
|
|
Loading…
Reference in New Issue