diff options
author | 2021-01-06 15:19:41 -0600 | |
---|---|---|
committer | 2021-01-06 15:19:41 -0600 | |
commit | e5a7fa02be0f56f034ffaf3bca7fdb523d3ef90f (patch) | |
tree | 86aec7be8425b6dfe6136b2ee5b03afa56e09ded /source/features/view-markdown-source.tsx | |
parent | 62809a1ba44c1fb1eb451ba97427bef822cbc00c (diff) | |
download | refined-github-e5a7fa02be0f56f034ffaf3bca7fdb523d3ef90f.tar.gz refined-github-e5a7fa02be0f56f034ffaf3bca7fdb523d3ef90f.tar.zst refined-github-e5a7fa02be0f56f034ffaf3bca7fdb523d3ef90f.zip |
Fix `embed-gist-inline` style and preserve the original link (#3866)
Diffstat (limited to 'source/features/view-markdown-source.tsx')
-rw-r--r-- | source/features/view-markdown-source.tsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/features/view-markdown-source.tsx b/source/features/view-markdown-source.tsx index b1aaeab4..20ac64f4 100644 --- a/source/features/view-markdown-source.tsx +++ b/source/features/view-markdown-source.tsx @@ -15,7 +15,9 @@ import {buildRepoURL} from '../github-helpers'; const lineActions = onetime(async () => { // Avoid having to create the entire 60 lines of JSX. The URL is hardcoded to a file we know the DOM exists. const randomKnownFile = 'https://github.com/sindresorhus/refined-github/blob/b1229bbaeb8cf071f0711bc2ed1b40dd96cd7a05/.editorconfig'; - const html = await browser.runtime.sendMessage({request: randomKnownFile}); + + // Fetch background.js due to CORB policies + const html = await browser.runtime.sendMessage({fetch: randomKnownFile}); const blobToolbar = domify(html).querySelector('.BlobToolbar')!; select('a#js-view-git-blame', blobToolbar)!.href = new GitHubURL(location.href).assign({route: 'blame'}).href; select('a#js-new-issue', blobToolbar)!.href = buildRepoURL('issues/new'); |