[GotHub] Add GitHub gists support

This commit is contained in:
NoPlagiarism 2023-07-15 18:49:17 +05:00
parent c46c0fb83a
commit b1eec4f275
2 changed files with 4 additions and 2 deletions

View File

@ -501,6 +501,7 @@ function redirect(url, type, initiator, forceRedirection) {
const path = regex[4]
return `${randomInstance}/file/${user}/${repo}/${branch}/${path}`
}
if (url.hostname == "gist.github.com") return `${randomInstance}/gist${url.pathname}${url.search}`
return `${randomInstance}${url.pathname}${url.search}`
}
case "mikuInvidious": {

View File

@ -708,7 +708,8 @@
}
},
"targets": [
"^https?:\\/{2}github\\.com\\/"
"^https?:\\/{2}github\\.com\\/",
"^https?:\\/{2}gist.github\\.com\\/[^\\/]+\\/[^\\/]+\\/?"
],
"name": "GitHub",
"options": {
@ -886,4 +887,4 @@
"url": "https://www.wolframalpha.com"
}
}
}
}