Skip to content

Select links with bdi child element for MusicBrainz entries if possible#316

Open
StormPooper wants to merge 4 commits intotrossr32:stagingfrom
StormPooper:musicbrainz-urls
Open

Select links with bdi child element for MusicBrainz entries if possible#316
StormPooper wants to merge 4 commits intotrossr32:stagingfrom
StormPooper:musicbrainz-urls

Conversation

@StormPooper
Copy link
Copy Markdown
Contributor

I have the Link Harmony release actions UserScript in Tampermonkey, which adds a link to Harmony in the release header if it finds an entry on the site. The extension was picking this element up due to lack of selector specificity, so I've updated the extension logic to try to be more specific if we have browser support and fall back to the original behaviour if not (as the extension does support versions older than :has support goes back). I also removed the direct descendant h1 > a as it seems some pages wrap the a in a span, so I instead focused on the bdi child element, which all 3 seem to have from my testing - I've verified the test URLs in musicbrainz.spec.ts all still work.

Before (icon URL contains Harmony URL):
Lidarr icon using Harmony URL from userscript element

After (correct Lidarr URL):
Lidarr icon with correct URL

@StormPooper StormPooper marked this pull request as draft February 7, 2026 00:44
@StormPooper StormPooper marked this pull request as ready for review February 7, 2026 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant