We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
isDiscussion()
1 parent a31e4a8 commit f3405fcCopy full SHA for f3405fc
index.ts
@@ -207,7 +207,7 @@ addTests('isProjects', [
207
'https://github.com/sindresorhus/refined-github/projects',
208
]);
209
210
-export const isDiscussion = (url: URL | HTMLAnchorElement | Location = location): boolean => /^discussions\/\d+/.test(getRepo(url)?.path ?? getOrg(url)?.path!) || getRepo(url)?.path === 'discussions/new';
+export const isDiscussion = (url: URL | HTMLAnchorElement | Location = location): boolean => /^discussions\/(\d+|new)/.test(getRepo(url)?.path ?? getOrg(url)?.path!);
211
addTests('isDiscussion', [
212
'https://github.com/tophf/mpiv/discussions/50',
213
'https://github.com/orgs/community/discussions/11202',
0 commit comments