summaryrefslogtreecommitdiff
path: root/source/features/view-markdown-source.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'source/features/view-markdown-source.tsx')
-rw-r--r--source/features/view-markdown-source.tsx4
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');