From b3284c245f17de974bbb41277a9540447169011a Mon Sep 17 00:00:00 2001 From: Grigory Date: Wed, 11 Feb 2026 22:20:59 +0500 Subject: [PATCH 1/5] Fix `isOrganizationRepo` --- index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.ts b/index.ts index ae28605..8799724 100644 --- a/index.ts +++ b/index.ts @@ -186,7 +186,8 @@ TEST: addTests('isNotifications', [ export const isOrganizationProfile = (): boolean => exists('meta[name="hovercard-subject-tag"][content^="organization"]'); -export const isOrganizationRepo = (): boolean => exists('.AppHeader-context-full [data-hovercard-type="organization"]'); +// TODO: Remove the second check after June 2026 +export const isOrganizationRepo = (): boolean => Boolean($('qbsearch-input')?.getAttribute('data-current-org')) || exists('.AppHeader-context-full [data-hovercard-type="organization"]'); export const isTeamDiscussion = (url: URL | HTMLAnchorElement | Location = location): boolean => Boolean(getOrg(url)?.path.startsWith('teams')); TEST: addTests('isTeamDiscussion', [ From 6f19b579f05395baa1891409d6b01cd05eaed176 Mon Sep 17 00:00:00 2001 From: Grigory Date: Thu, 12 Feb 2026 20:41:00 +0500 Subject: [PATCH 2/5] exists --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 8799724..1901ecd 100644 --- a/index.ts +++ b/index.ts @@ -187,7 +187,7 @@ TEST: addTests('isNotifications', [ export const isOrganizationProfile = (): boolean => exists('meta[name="hovercard-subject-tag"][content^="organization"]'); // TODO: Remove the second check after June 2026 -export const isOrganizationRepo = (): boolean => Boolean($('qbsearch-input')?.getAttribute('data-current-org')) || exists('.AppHeader-context-full [data-hovercard-type="organization"]'); +export const isOrganizationRepo = (): boolean => exists('qbsearch-input[data-current-org]:not[[data-current-org]=""]') || exists('.AppHeader-context-full [data-hovercard-type="organization"]'); export const isTeamDiscussion = (url: URL | HTMLAnchorElement | Location = location): boolean => Boolean(getOrg(url)?.path.startsWith('teams')); TEST: addTests('isTeamDiscussion', [ From 6110369ab37301c55753ed395b368c3392f9fb23 Mon Sep 17 00:00:00 2001 From: Grigory Date: Thu, 12 Feb 2026 20:47:44 +0500 Subject: [PATCH 3/5] Revert "exists" This reverts commit 6f19b579f05395baa1891409d6b01cd05eaed176. --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 1901ecd..8799724 100644 --- a/index.ts +++ b/index.ts @@ -187,7 +187,7 @@ TEST: addTests('isNotifications', [ export const isOrganizationProfile = (): boolean => exists('meta[name="hovercard-subject-tag"][content^="organization"]'); // TODO: Remove the second check after June 2026 -export const isOrganizationRepo = (): boolean => exists('qbsearch-input[data-current-org]:not[[data-current-org]=""]') || exists('.AppHeader-context-full [data-hovercard-type="organization"]'); +export const isOrganizationRepo = (): boolean => Boolean($('qbsearch-input')?.getAttribute('data-current-org')) || exists('.AppHeader-context-full [data-hovercard-type="organization"]'); export const isTeamDiscussion = (url: URL | HTMLAnchorElement | Location = location): boolean => Boolean(getOrg(url)?.path.startsWith('teams')); TEST: addTests('isTeamDiscussion', [ From 3b07373c728af7a6cd75705a3427c54a3b67b638 Mon Sep 17 00:00:00 2001 From: Grigory Date: Sat, 14 Feb 2026 12:45:39 +0500 Subject: [PATCH 4/5] fixes and improvements --- index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.ts b/index.ts index 8799724..6b3fe49 100644 --- a/index.ts +++ b/index.ts @@ -186,8 +186,11 @@ TEST: addTests('isNotifications', [ export const isOrganizationProfile = (): boolean => exists('meta[name="hovercard-subject-tag"][content^="organization"]'); -// TODO: Remove the second check after June 2026 -export const isOrganizationRepo = (): boolean => Boolean($('qbsearch-input')?.getAttribute('data-current-org')) || exists('.AppHeader-context-full [data-hovercard-type="organization"]'); +export const isOrganizationRepo = (): boolean => exists([ + 'qbsearch-input[data-current-repository]:not([data-current-repository=""])[data-current-org]:not([data-current-org=""])', + // TODO: Remove after June 2026 + '.AppHeader-context-full [data-hovercard-type="organization"]', +].join(',')); export const isTeamDiscussion = (url: URL | HTMLAnchorElement | Location = location): boolean => Boolean(getOrg(url)?.path.startsWith('teams')); TEST: addTests('isTeamDiscussion', [ From 47d46756c4b208247e25b25a26326dc562b9d8b1 Mon Sep 17 00:00:00 2001 From: Grigory Date: Sat, 14 Feb 2026 14:14:34 +0500 Subject: [PATCH 5/5] Update index.ts Co-authored-by: fregante --- index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 6b3fe49..fe4450b 100644 --- a/index.ts +++ b/index.ts @@ -187,7 +187,7 @@ TEST: addTests('isNotifications', [ export const isOrganizationProfile = (): boolean => exists('meta[name="hovercard-subject-tag"][content^="organization"]'); export const isOrganizationRepo = (): boolean => exists([ - 'qbsearch-input[data-current-repository]:not([data-current-repository=""])[data-current-org]:not([data-current-org=""])', + 'qbsearch-input[data-current-repository][data-current-org]:not([data-current-repository=""], [data-current-org=""])', // TODO: Remove after June 2026 '.AppHeader-context-full [data-hovercard-type="organization"]', ].join(','));