Skip to content

Commit

Permalink
Include /dashboard-feed in isDashboard (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
port19x committed Sep 28, 2023
1 parent 5dd1732 commit 6ed1e73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.ts
Expand Up @@ -61,7 +61,7 @@ addTests('isCompareWikiPage', [
'https://github.com/brookhong/Surfingkeys/wiki/Color-Themes/_compare/8ebb46b1a12d16fc1af442b7df0ca13ca3bb34dc...80e51eeabe69b15a3f23880ecc36f800b71e6c6d',
]);

export const isDashboard = (url: URL | HTMLAnchorElement | Location = location): boolean => !isGist(url) && /^$|^(orgs\/[^/]+\/)?dashboard(\/|$)/.test(getCleanPathname(url));
export const isDashboard = (url: URL | HTMLAnchorElement | Location = location): boolean => !isGist(url) && /^$|^(orgs\/[^/]+\/)?dashboard(-feed)?(\/|$)/.test(getCleanPathname(url));
addTests('isDashboard', [
'https://github.com///',
'https://github.com//',
Expand All @@ -81,6 +81,7 @@ addTests('isDashboard', [
'https://github.com/?tab=following', // Gotcha for `isUserProfileFollowingTab`
'https://github.com/?tab=overview', // Gotcha for `isUserProfileMainTab`
'https://github.com?search=1', // Gotcha for `isRepoTree`
'https://github.com/dashboard-feed',
]);

export const isEnterprise = (url: URL | HTMLAnchorElement | Location = location): boolean => url.hostname !== 'github.com' && url.hostname !== 'gist.github.com';
Expand Down

0 comments on commit 6ed1e73

Please sign in to comment.