Skip to content

Commit 6f5d835

Browse files
Fix isOrganizationRepo (#231)
Co-authored-by: fregante <me@fregante.com>
1 parent 93d0102 commit 6f5d835

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,11 @@ TEST: addTests('isNotifications', [
186186

187187
export const isOrganizationProfile = (): boolean => exists('meta[name="hovercard-subject-tag"][content^="organization"]');
188188

189-
export const isOrganizationRepo = (): boolean => exists('.AppHeader-context-full [data-hovercard-type="organization"]');
189+
export const isOrganizationRepo = (): boolean => exists([
190+
'qbsearch-input[data-current-repository][data-current-org]:not([data-current-repository=""], [data-current-org=""])',
191+
// TODO: Remove after June 2026
192+
'.AppHeader-context-full [data-hovercard-type="organization"]',
193+
].join(','));
190194

191195
export const isTeamDiscussion = (url: URL | HTMLAnchorElement | Location = location): boolean => Boolean(getOrg(url)?.path.startsWith('teams'));
192196
TEST: addTests('isTeamDiscussion', [

0 commit comments

Comments
 (0)