feat: Add Harmony release action links to MusicBrainz pages
This userscript adds a convenient link to the Harmony website directly from MusicBrainz pages, making it easier to jump to Harmony's release-specific actions.
Motivation:
Currently, navigating from a MusicBrainz release to its corresponding Harmony actions page requires manually copying the MBID and constructing the URL. This script automates that process by adding a clickable icon.
Functionality:
-
On single release pages, the icon is placed in the main page header next to the release title.
-
On release group and artist releases pages, icons are added next to each release listed in the main table.
-
Clicking any icon opens the corresponding Harmony release actions URL (https://harmony.pulsewidth.org.uk/release/actions?release_mbid=...) in a new browser tab.
should i add the built script to the PR?
Hi, my time is limited currently, so I won't get to review this PR before the weekend.
However, I wanted to let you know early that there is already another userscript which does a similar task. From a brief look, it seems that your script supports more MB pages, so it might be worth trying to integrate this into the other userscript, if it fits there.
Thanks for letting me know! No worries at all—take your time reviewing the PR, I understand you have other priorities.
I hadn’t realized there was another userscript doing something similar. My intent was just to convert your bookmarklet into a script and extend it to more MB pages. I’d prefer to keep it here since the project structure is well-organized with the build scripts, and I’ve reused some of your functions to avoid duplication. Also, since I’ve already put together the PR, integrating it into the other userscript would require reworking things a bit due to the different approaches.
I also think that in the long run, having a centralized place for MusicBrainz userscripts, rather than everyone maintaining separate repositories, would make things easier to manage and discover. But of course, I’m open to discussion if you feel otherwise! Let me know your thoughts when you have time.
Thanks for taking the time to build, test, and provide feedback on the userscript! I really appreciate it.
I understand your point about the icons on artist/RG pages potentially being less frequently used after an initial pass. To address it I have added a key value to later turn it off. I'm happy to maintain the script as I use it, also as it might still be useful for users who frequently interact with Harmony or revisit those pages. If maintenance becomes an issue down the line, we can definitely reassess.
Regarding your specific feedback on the script itself:
- Icon Placement: I've updated the script to inject the Harmony icon after the release title/link on all page types (release header, RG table, artist releases table). I agree this feels cleaner as a secondary action.
-
Styling: I've removed all inline style attributes. The icon link and the icon image now use CSS classes (
harmony-userscript-linkandharmony-userscript-icon). The necessary styles (including size and margin) are dynamically generated based on configuration and injected into the page's<head>via a<style>tag. -
Configuration: The configurable values (icon size and left margin, plus to turn off on RG/Artist pages) are now stored and retrieved using
GM_getValueandGM_setValue. Users can modify these directly in their userscript manager's storage tab if they want to tweak the appearance. Default values are applied if nothing is set.
I've pushed these changes. Let me know what you think!
Thanks again for the review and guidance.
sorry for the late reply
I have applied your suggestions as well as added logic to get format column from instead of hard coding the value.
It works with the userscript you linked. However it worked without the patch as well! I think it must be because my script ran before the other one could add a new column, and hence i could not test my scripts failure before this patch. Regardless, it should now work with the new patch with any number of columns being added/removed.