On‐the‐fly link changer library
This is the library side of #151. Cool names range from A LINK TO THE PAST to RE‐LINK.
#186 requires conditional changes, give parameter to exclude :mouse: right click, but maybe not only.
Take Snap Links event listener from PREFERRED MB.
PREFERRED MBS seems to avoid change on right click, copy that.
There is no avoid on right click actually now. No need IMO.
But I think it should not alter protocol to // when same protocol.
Principle would be something like:
LinkChanger({match: /url-regex/, replace: "$1... $9 and $* would work"});
With some possible exceptions:
By default, exceptions is the same as match:
LinkChanger({match: /^(https?:)?\/\/(\w+\.)?musicbrainz\.org(\/.*)/, replace: "https://musicbrainz.org$3"});
But we could also want to not modify links on some websites:
LinkChanger({match: /^(https?:)?\/\/(\w+\.)?musicbrainz\.org(\/.*)/, replace: "https://musicbrainz.org$3", exclude: /some-website/});
Removed obsolete scripts.
mb_REVIVE-DELETED-EDITORS does not seem to change any links, on the fly. At least, not yet.