Skip to content

Commit

Permalink
Added raw.githubusercontent.co support for GotHub #890
Browse files Browse the repository at this point in the history
  • Loading branch information
ManeraKai committed Jan 28, 2024
1 parent ca8be7a commit 1b95b1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/assets/javascripts/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ function redirect(url, type, initiator, forceRedirection, incognito) {
}
case "gothub": {
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}`
}
case "mikuInvidious": {
Expand Down
3 changes: 2 additions & 1 deletion src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,8 @@
},
"targets": [
"^https?:\\/{2}github\\.com\\/",
"^https?:\\/{2}gist\\.github\\.com\\/[^\\/]+\\/[^\\/]+\\/?"
"^https?:\\/{2}gist\\.github\\.com\\/[^\\/]+\\/[^\\/]+\\/?",
"^https?:\\/{2}raw\\.githubusercontent\\.com\\/[^\\/]+\\/[^\\/]+\\/?"
],
"name": "GitHub",
"options": {
Expand Down

0 comments on commit 1b95b1c

Please sign in to comment.