Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include /dashboard-feed in isDashboard #187

Merged
merged 9 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion index.ts
Original file line number Diff line number Diff line change
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,8 @@ 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',
'https://github.com//dashboard-feed',
fregante marked this conversation as resolved.
Show resolved Hide resolved
]);

export const isEnterprise = (url: URL | HTMLAnchorElement | Location = location): boolean => url.hostname !== 'github.com' && url.hostname !== 'gist.github.com';
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"@sindresorhus/tsconfig": "^3.0.1",
"@sveltejs/vite-plugin-svelte": "^2.4.3",
"ava": "^5.3.1",
"github-reserved-names": "^2.0.4",
"github-reserved-names": "^2.0.5",
"npm-run-all": "^4.1.5",
"strip-indent": "^4.0.0",
"svelte": "^4.1.2",
Expand Down