musicbrainz-scripts
musicbrainz-scripts copied to clipboard
Point to userscript homepage in edit note
It may be better to direct editors to the specific homepage of the script being used rather than just the namespace, which isn't required to be a URL at all.
This change would affect your userscripts as well, so I understand if you don't want to merge this.
Fixes zabe40/musicbrainz-userscripts#20
The reason why this uses the namespace instead of the homepage URL was that this was the only property which was available in GreaseMonkey, TamperMonkey and ViolentMonkey.
Is this also the case for GM_info.scriptMetaStr?
Even if it is it still feels a bit hacky to me, maybe we could instead try to use a fallback based solution (homepage URL before namespace)?
I don't have the time to test all these potential improvements myself currently, sorry.
All good, I've just vendored in the buildEditNote to make it do what I want in https://github.com/zabe40/musicbrainz-userscripts/commit/36e1853b4252fbe2c628d1a9a7a88d6db68fcc60. Feel free to close this PR if you don't think you'll return to it.
Cool that you have found a solution. After all, this is only a very simple function which fulfills a specific need of my own userscripts, so if you need it customized you can just copy and adapt it.