Skip when a url ends with `.patch`, `.diff` (#308)
This commit is contained in:
parent
bb5979d425
commit
97eadcbec0
|
@ -123,9 +123,9 @@ class GitHub extends Adapter {
|
|||
return cb()
|
||||
}
|
||||
|
||||
// (username)/(reponame)[/(type)]
|
||||
const match = window.location.pathname.match(/([^\/]+)\/([^\/]+)(?:\/([^\/]+))?/)
|
||||
if (!match) {
|
||||
// (username)/(reponame)[/(type)][.*][.(patch|diff)]
|
||||
const match = window.location.pathname.match(/([^\/]+)\/([^\/]+)(?:\/([^\/]+))?(?:\/[^.]+)?(?:\.(patch|diff))?$/i)
|
||||
if (!match || match[4]) {
|
||||
return cb()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue