[GotHub] Add GitHub gists support
This commit is contained in:
parent
c46c0fb83a
commit
b1eec4f275
@ -501,6 +501,7 @@ function redirect(url, type, initiator, forceRedirection) {
|
|||||||
const path = regex[4]
|
const path = regex[4]
|
||||||
return `${randomInstance}/file/${user}/${repo}/${branch}/${path}`
|
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}`
|
return `${randomInstance}${url.pathname}${url.search}`
|
||||||
}
|
}
|
||||||
case "mikuInvidious": {
|
case "mikuInvidious": {
|
||||||
|
@ -708,7 +708,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"targets": [
|
"targets": [
|
||||||
"^https?:\\/{2}github\\.com\\/"
|
"^https?:\\/{2}github\\.com\\/",
|
||||||
|
"^https?:\\/{2}gist.github\\.com\\/[^\\/]+\\/[^\\/]+\\/?"
|
||||||
],
|
],
|
||||||
"name": "GitHub",
|
"name": "GitHub",
|
||||||
"options": {
|
"options": {
|
||||||
@ -886,4 +887,4 @@
|
|||||||
"url": "https://www.wolframalpha.com"
|
"url": "https://www.wolframalpha.com"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user