diff options
Diffstat (limited to '')
-rw-r--r-- | source/features/embed-gist-inline.tsx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source/features/embed-gist-inline.tsx b/source/features/embed-gist-inline.tsx index 711f3610..0bdb0e63 100644 --- a/source/features/embed-gist-inline.tsx +++ b/source/features/embed-gist-inline.tsx @@ -4,7 +4,6 @@ import select from 'select-dom'; import * as pageDetect from 'github-url-detection'; import features from '.'; -import {isFirefox} from '../github-helpers'; const isGist = (link: HTMLAnchorElement): boolean => !link.pathname.includes('.') && // Exclude links to embed files @@ -20,8 +19,8 @@ async function embedGist(link: HTMLAnchorElement): Promise<void> { link.after(info); try { - const response = await fetch(`${link.href}.json`); - const gistData = await response.json(); + // Get the gist via background.js due to CORB policies introduced in Chrome 73 + const gistData = await browser.runtime.sendMessage({request: `${link.href}.json`}); const files = domify.one(gistData.div)!; const fileCount = files.children.length; @@ -60,9 +59,5 @@ void features.add({ include: [ pageDetect.hasComments ], - exclude: [ - // https://github.com/sindresorhus/refined-github/issues/2022 - () => isFirefox - ], init }); |