Skip to content

Commit

Permalink
Add isLoggedIn (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante authored May 31, 2024
1 parent 62b20df commit 0bb2aad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export const is500 = (): boolean => document.title === 'Server Error · GitHub'

export const isPasswordConfirmation = (): boolean => document.title === 'Confirm password' || document.title === 'Confirm access';

export const isLoggedIn = (): boolean => exists('body.logged-in');

export const isBlame = (url: URL | HTMLAnchorElement | Location = location): boolean => Boolean(getRepo(url)?.path.startsWith('blame/'));
addTests('isBlame', [
'https://github.com/sindresorhus/refined-github/blame/master/package.json',
Expand Down

0 comments on commit 0bb2aad

Please sign in to comment.