diff options
author | 2019-09-08 02:51:48 +0700 | |
---|---|---|
committer | 2019-09-08 02:51:48 +0700 | |
commit | 131aff7cd287c1f09f57f469e2e81489796cb281 (patch) | |
tree | afa549980dbf22b4a535211258eeb7876f596ad8 /source/features/embed-gist-inline.tsx | |
parent | 7c931098b020c35c25cbb2fe289b9c5300f6a645 (diff) | |
download | refined-github-131aff7cd287c1f09f57f469e2e81489796cb281.tar.gz refined-github-131aff7cd287c1f09f57f469e2e81489796cb281.tar.zst refined-github-131aff7cd287c1f09f57f469e2e81489796cb281.zip |
Avoid running `embed-gist-inline` in Firefox19.9.8
It's just not supported by the browser.
Closes https://github.com/sindresorhus/refined-github/issues/2022
Diffstat (limited to 'source/features/embed-gist-inline.tsx')
-rw-r--r-- | source/features/embed-gist-inline.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/features/embed-gist-inline.tsx b/source/features/embed-gist-inline.tsx index 45b51f7c..6ac2d838 100644 --- a/source/features/embed-gist-inline.tsx +++ b/source/features/embed-gist-inline.tsx @@ -38,7 +38,7 @@ async function embedGist(link: HTMLAnchorElement): Promise<void> { ); } } catch { - info.replaceWith(' (embed failed)'); + info.remove(); } } @@ -50,11 +50,15 @@ function init(): void { features.add({ id: __featureName__, - description: 'Embeds linked gists.', + description: 'Embeds linked gists. Not supported by Firefox.', screenshot: 'https://user-images.githubusercontent.com/6978877/33911900-c62ee968-df8b-11e7-8685-506ffafc60b4.', include: [ features.hasComments ], + exclude: [ + // https://github.com/sindresorhus/refined-github/issues/2022 + () => navigator.userAgent.includes('Firefox/') + ], load: features.onAjaxedPages, init }); |