Where is the all=1 user script?

This simple script actually works but I don’t know enough about user scripts so this might not work in several other cases. What am I missing here that would make it break?

// ==UserScript==
// @name             mb. all=1
// @match            https://musicbrainz.org/artist/*
// @version          1.0
// @run-at           document-start
// ==/UserScript==

console.log("mb.all=1 START");

if (!/\?.*all=1/.test(location.href)) {
  let newUrl = location.href;
  if (!newUrl.trim().match(/\?/)) {
    newUrl += "?";
  }
  newUrl += "all=1";
	console.log("mb.all=1 new URL: ", newUrl);
  location.href = newUrl;
} else {
	console.log("mb.all=1 URL already has query string all=1");
}

console.log("mb.all=1 END");

FireMonkey complains about “unsafewindow is not defined” on many scripts. Seeing the jquery code I am wondering, aren’t several scripts just out of date?

What are you trying to do?
Why FireMonkey?
Violentmonkey is well supported and is working very well for people.

I do know how to workaround this Tampermonkey limitation.

Insert either:

// @match *://*/*

Or:

// @include /^https?:\/\//

Before the existing following line:

// @run-at: xxx

I don’t know just yet, if I want to work-around a Tampermonkey limitation in an urgent priority.
It’s why I made a ticket to remind me of it when I have some time.

If you still use Tampermonkey, you can update my script(s), it has been edited to workaround this problem. :slight_smile:

1 Like

It works! :slight_smile: Thanks for the help

1 Like

Thanks very much for reporting.
This script and 3 others were no longer running in Tampermonkey since 2061!

1 Like

Sounds safe to me… :rofl:

1 Like

Ach, I meant 2016, of course. :rofl:

1 Like