@ -11,6 +11,7 @@ import {
|
|||||||
getGithubCommitWithinPullUrlParams,
|
getGithubCommitWithinPullUrlParams,
|
||||||
} from './web'
|
} from './web'
|
||||||
import gitHubInjection from 'github-injection'
|
import gitHubInjection from 'github-injection'
|
||||||
|
import { isFilenameSupported } from './diff'
|
||||||
|
|
||||||
const root = createReactRoot(document)
|
const root = createReactRoot(document)
|
||||||
|
|
||||||
@ -141,9 +142,11 @@ async function run() {
|
|||||||
const blobParams = getGithubBlobUrlParams(url)
|
const blobParams = getGithubBlobUrlParams(url)
|
||||||
if (blobParams) {
|
if (blobParams) {
|
||||||
const { owner, repo, sha, filename } = blobParams
|
const { owner, repo, sha, filename } = blobParams
|
||||||
console.log('Found blob diff: ', owner, repo, sha, filename)
|
if (isFilenameSupported(filename)) {
|
||||||
await injectBlob(owner, repo, sha, filename, window.document)
|
console.log('Found supported blob: ', owner, repo, sha, filename)
|
||||||
return
|
await injectBlob(owner, repo, sha, filename, window.document)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user