Skip to content

Commit 1b95b1c

Browse files
committed
Added raw.githubusercontent.co support for GotHub #890
1 parent ca8be7a commit 1b95b1c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/assets/javascripts/services.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,7 @@ function redirect(url, type, initiator, forceRedirection, incognito) {
419419
}
420420
case "gothub": {
421421
if (url.hostname == "gist.github.com") return `${randomInstance}/gist${url.pathname}${url.search}`
422+
if (url.hostname == "raw.githubusercontent.com") return `${randomInstance}/raw${url.pathname}${url.search}`
422423
return `${randomInstance}${url.pathname}${url.search}`
423424
}
424425
case "mikuInvidious": {

src/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,8 @@
637637
},
638638
"targets": [
639639
"^https?:\\/{2}github\\.com\\/",
640-
"^https?:\\/{2}gist\\.github\\.com\\/[^\\/]+\\/[^\\/]+\\/?"
640+
"^https?:\\/{2}gist\\.github\\.com\\/[^\\/]+\\/[^\\/]+\\/?",
641+
"^https?:\\/{2}raw\\.githubusercontent\\.com\\/[^\\/]+\\/[^\\/]+\\/?"
641642
],
642643
"name": "GitHub",
643644
"options": {

0 commit comments

Comments
 (0)