Skip to content

Commit

Permalink
Detect is404 even if logged out (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber committed Nov 21, 2021
1 parent 530e4fb commit 11e5bca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ collect.set('__urls_that_dont_match__', [
'https://github.com/sindresorhus/refined-github/issues/templates/edit',
]);

export const is404 = (): boolean => document.title === 'Page not found · GitHub';
export const is404 = (): boolean => document.title.startsWith('Page not found · GitHub'); // #98

export const is500 = (): boolean => document.title === 'Server Error · GitHub' || document.title === 'Unicorn! · GitHub' || document.title === '504 Gateway Time-out';

Expand Down

0 comments on commit 11e5bca

Please sign in to comment.