diff options
Diffstat (limited to 'source/features/embed-gist-inline.tsx')
-rw-r--r-- | source/features/embed-gist-inline.tsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/features/embed-gist-inline.tsx b/source/features/embed-gist-inline.tsx index 13fc2022..808002a4 100644 --- a/source/features/embed-gist-inline.tsx +++ b/source/features/embed-gist-inline.tsx @@ -21,6 +21,10 @@ async function embedGist(link: HTMLAnchorElement): Promise<void> { try { // Fetch via background.js due to CORB policies const gistData = await browser.runtime.sendMessage({fetchJSON: `${link.href}.json`}); + if (gistData.div.length > 10000) { + info.textContent = ' (too large to embed)'; + return; + } const fileCount: number = gistData.files.length; if (fileCount > 1) { |