Skip to content

Commit

Permalink
Merge pull request #814 from kellnerd/wiki-domain
Browse files Browse the repository at this point in the history
Leave wiki links in annotations intact
  • Loading branch information
jesus2099 authored Feb 25, 2024
2 parents 24f1400 + 0c572c6 commit 41eaa92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mb_COLLECTION-HIGHLIGHTER.user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ==UserScript==
// @name mb. COLLECTION HIGHLIGHTER
// @version 2023.9.29
// @version 2024.2.25
// @description musicbrainz.org: Highlights releases, release-groups, etc. that you have in your collections (anyone’s collection can be loaded) everywhere
// @namespace https://github.com/jesus2099/konami-command
// @supportURL https://github.com/jesus2099/konami-command/labels/mb_COLLECTION-HIGHLIGHTER
Expand Down Expand Up @@ -240,7 +240,7 @@ if (cat) {
function findOwnedStuff() {
// Annotation link trim spaces and protocol + "//" + host
for (let annotationLinks = document.querySelectorAll("div#content div.annotation a, div#content div.annotation-preview a"), l = 0; l < annotationLinks.length; l++) {
annotationLinks[l].setAttribute("href", annotationLinks[l].getAttribute("href").trim().replace(/^((https?:)?\/\/(\w+\.)?musicbrainz\.org)\//, "/"));
annotationLinks[l].setAttribute("href", annotationLinks[l].getAttribute("href").trim().replace(/^((https?:)?\/\/((beta|test)\.)?musicbrainz\.org)\//, "/"));
}
for (let stu = 0; stu < collectedStuff.length; stu++) {
var cstuff = collectedStuff[stu];
Expand Down

0 comments on commit 41eaa92

Please sign in to comment.