Copy Dates Greasemonkey userscript does not add buttons to Relationship Editor (FIrefox, mac)

userscripts
macosx
Tags: #<Tag:0x00007f23c1b71470> #<Tag:0x00007f23c1b71308>

#1

Has anyone seen this problem? I installed @loujin’s userscript “mb-reledit-copy_dates.user.js”, and entered the Edit Relationships page for a Release. I did not see any buttons or other UI about copying dates. I expected to see an H3 heading Dates just under the row of tabs “Overview”, “Disc IDs”, …, “Edit”, with buttons “Copy dates” and “Remove dates”.

I did a little poking around with web developer tools, and couldn’t figure out the problem. Reloading the Edit Relationships page, or exiting and re-entering the page, did not help.

I’m using Firefox 58.0.2 on Mac OS X 10.11.6. A few months ago, on a much older version of Firefox, an earlier version of this userscript this worked for me.

The Dates buttons do show up as expected on Chrome 64.0.3282.140. So, using Chrome is a workaround. Installing “MusicBrainz relation editor: Copy dates on recording relations” from GreasyFork gave the same results.

Any ideas for how to make the userscript work in Firefox?

Thanks,
—Jim DeLaHunt


#2

No error in the web console? You see the problem on all releases I guess? Which version of the script and where did you download it from?

Edit: and which script manager? scripts are broken with GreaseMonkey at the moment, but firefox + tampermonkey should work


#3

Thank you for the prompt reply, @loujin .

GreaseMonkey 4.2, updated 2018-01-19. Uh-oh, that may be my problem right there. I’ll try on Firefox with Tampermonkey.

Which brings up the question, when scripts are broken with GreaseMonkey, how should a script-user find that out? I used the list at The Classical Editor Toolbox . What it says there is:

Which seems to say a) Greasemonkey is the thing to use on Firefox, and b) Tampermonkey is not for Firefox.

I hadn’t actually looked at that. I guess it was very little poking around with web developer tools. So, I just looked at the web developer console. I see errors for a number of userscripts. This one is for the Copy Dates script, and the errors for other scripts look similar:

Script error:  
ReferenceError
columnNumber: 5
fileName: "resource://gre/modules/ExtensionContent.jsm"
lineNumber: 754
message: "_ is not defined"
stack: "buildOptions@user-script:mbz-loujine/MusicBrainz%20relation%20editor%3A%20Copy%20dates%20on%20recording%20relations:754:5\nscopeWrapper@user-script:mbz-loujine/MusicBrainz%20relation%20editor%3A%20Copy%20dates%20on%20recording%20relations:770:13\n@user-script:mbz-loujine/MusicBrainz%20relation%20editor%3A%20Copy%20dates%20on%20recording%20relations:361:17\n"
__proto__: {…}
constructor: function ReferenceError()
message: ""
name: "ReferenceError"
stack: ""
__proto__: Object { … }

I haven’t tested that yet.

In every case, the version 2018.1.8. I installed multiple times, from different locations. Same symptoms each time.

OK, my next step is to try with Tampermonkey. If that works, I turn off GreaseMonkey and use TamperMonkey instead.

Thank you! —Jim


#4

TamperMonkey makes the Copy Dates userscript work. At least, the UI appears correct. I haven’t exercised it yet.

Using: Firefox 58.0.2 and TamperMonkey 4.5.5660 on Mac OS X 10.11.6.

The conclusion I draw from this is, use TamperMonkey not GreaseMonkey, at least on my system and at least for now.

Thank you! —Jim


#5

When I wrote that I didn’t even know Tampermonkey for Firefox existed, but now it does seem to be the best option. Amended the post! (I’m a Chrome user)


#6

Yeah, my scripts are incompatible with GreaseMonkey 4/FF > 57 for the moment (see the userscripts poll thread for more details). I think I updated my docs but I didn’t think about reo’s post


#7

For the benefit of other readers, here’s a link to Greasemonkey 4 Announcement, 20 Sept 2017:

With the upcoming Firefox 57 release, … Mozilla is completely replacing the extension system in Firefox… As a result, version 4 of Greasemonkey is a nearly complete re-write. … A variety of compromises have been made. We’ve elected to make a rare backwards incompatible change.

And, Greasemonkey 4 For Users, 20 Sept 2017:

…this will break some scripts. If you rely on such scripts, you might want to install Violentmonkey or Tampermonkey, both of which provide better compatibility for existing scripts.

Among those changes: some userscripts we like for MusicBrainz no longer work as of Firefox 57. So, use TamperMonkey.