Added raw.githubusercontent.co support for GotHub https://github.com/libredirect/browser_extension/issues/890

This commit is contained in:
ManeraKai 2024-01-28 16:52:03 +03:00
parent ca8be7a99a
commit 1b95b1ce52
No known key found for this signature in database
GPG Key ID: 5ABC31FFD562E337
2 changed files with 3 additions and 1 deletions

View File

@ -419,6 +419,7 @@ function redirect(url, type, initiator, forceRedirection, incognito) {
} }
case "gothub": { case "gothub": {
if (url.hostname == "gist.github.com") return `${randomInstance}/gist${url.pathname}${url.search}` if (url.hostname == "gist.github.com") return `${randomInstance}/gist${url.pathname}${url.search}`
if (url.hostname == "raw.githubusercontent.com") return `${randomInstance}/raw${url.pathname}${url.search}`
return `${randomInstance}${url.pathname}${url.search}` return `${randomInstance}${url.pathname}${url.search}`
} }
case "mikuInvidious": { case "mikuInvidious": {

View File

@ -637,7 +637,8 @@
}, },
"targets": [ "targets": [
"^https?:\\/{2}github\\.com\\/", "^https?:\\/{2}github\\.com\\/",
"^https?:\\/{2}gist\\.github\\.com\\/[^\\/]+\\/[^\\/]+\\/?" "^https?:\\/{2}gist\\.github\\.com\\/[^\\/]+\\/[^\\/]+\\/?",
"^https?:\\/{2}raw\\.githubusercontent\\.com\\/[^\\/]+\\/[^\\/]+\\/?"
], ],
"name": "GitHub", "name": "GitHub",
"options": { "options": {