musicbrainz-scripts icon indicating copy to clipboard operation
musicbrainz-scripts copied to clipboard

Point to userscript homepage in edit note

Open zabe40 opened this issue 1 year ago • 2 comments
trafficstars

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

zabe40 avatar Aug 05 '24 05:08 zabe40

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.

kellnerd avatar Aug 10 '24 10:08 kellnerd

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.

zabe40 avatar Aug 12 '24 20:08 zabe40

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.

kellnerd avatar Sep 03 '24 12:09 kellnerd