Skip to content

Commit ea63d2b

Browse files
kidonngfregante
andcommitted
Fix console error caused by embed-gist-via-iframe (#2539)
Co-authored-by: Federico Brigante <github@bfred.it>
1 parent 4f5bf43 commit ea63d2b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

source/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,10 @@ export const _isSingleFile = [
328328
'https://github.com/sindresorhus/refined-github/blob/fix-narrow-diff/distribution/content.css',
329329
'https://github.com/sindresorhus/refined-github/blob/master/edit.txt'
330330
];
331+
export const isSingleGist = (): boolean => isGist() && /^\/(gist\/)?[^/]+\/[0-9a-f]{32}$/.test(location.pathname);
332+
export const _isSingleGist = [
333+
'https://gist.github.com/sindresorhus/0ea3c2845718a0a0f0beb579ff14f064'
334+
];
331335

332336
export const isTrending = (): boolean => location.pathname === '/trending' || location.pathname.startsWith('/trending/');
333337
export const _isTrending = [

0 commit comments

Comments
 (0)