Skip to content

Commit

Permalink
linkify-user-location - Support organization profile (#8192)
Browse files Browse the repository at this point in the history
  • Loading branch information
kidonng authored Jan 10, 2025
1 parent 61a0606 commit 644d9ab
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions source/features/linkify-user-location.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ function addLocation({nextElementSibling, nextSibling}: SVGElement): Element {
function initOnce(): void {
observe([
'[itemprop="homeLocation"] svg.octicon-location', // `isUserProfile`
'[aria-label="User location"] svg.octicon-location', // Hover cards
'.pagehead .has-location svg.octicon-location', // `isOrganizationProfile`
'[aria-label="User location"] svg.octicon-location', // User hover cards
'[aria-label="Organization Hovercard"] svg.octicon-location', // Organization hover cards
], addLocation);
}

Expand All @@ -41,7 +43,8 @@ void features.add(import.meta.url, {
Test URLs
https://github.com/docubot
https://github.com/
- isUserProfile: https://github.com/mysticatea
- isOrganizationProfile: https://github.com/github
- Hover cards: https://github.com/
*/

0 comments on commit 644d9ab

Please sign in to comment.