Skip to content

Commit

Permalink
Rename isOrganizationDiscussion to isTeamDiscussion (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Jul 28, 2022
1 parent 234ac20 commit 5ef9213
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ export const isOrganizationProfile = (): boolean => exists('meta[name="hovercard

export const isOrganizationRepo = (): boolean => Boolean(document.querySelector<HTMLElement>('[data-owner-scoped-search-url]')?.dataset['ownerScopedSearchUrl']!.startsWith('/org'));

export const isOrganizationDiscussion = (url: URL | HTMLAnchorElement | Location = location): boolean => /^orgs\/[^/]+\/teams\/[^/]+($|\/discussions)/.test(getCleanPathname(url));
addTests('isOrganizationDiscussion', [
export const isTeamDiscussion = (url: URL | HTMLAnchorElement | Location = location): boolean => /^orgs\/[^/]+\/teams\/[^/]+($|\/discussions)/.test(getCleanPathname(url));
addTests('isTeamDiscussion', [
'https://github.com/orgs/refined-github/teams/core-team/discussions?pinned=1',
'https://github.com/orgs/refined-github/teams/core-team/discussions/1',
'https://github.com/orgs/refined-github/teams/core-team',
Expand Down Expand Up @@ -630,7 +630,7 @@ export const hasComments = (url: URL | HTMLAnchorElement | Location = location):
isPR(url)
|| isIssue(url)
|| isCommit(url)
|| isOrganizationDiscussion(url)
|| isTeamDiscussion(url)
|| isSingleGist(url);

addTests('hasRichTextEditor', combinedTestOnly);
Expand Down

0 comments on commit 5ef9213

Please sign in to comment.