-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Greasemonkey #123
Comments
Would this also fix the script not working at all with Greasemonkey, or is that for a separate issue? |
Depends. If it's not working on Greasemonkey 4, I'd bet that's because of the API changes and that would be fixed by this issue. If it's not working on Greasemonkey 3 either, that'd be a separate issue 🙂 It could also be the same issue as @kellnerd faced with jQuery under GM4 (kellnerd/musicbrainz-scripts#12). Unfortunately the fix for Enhanced Cover Art Uploads wouldn't be as easy as just using a standalone version of jQuery or dropping jQuery altogether, because it needs to use MB's jQuery to enqueue the images, any other jQuery or native browser functionality doesn't seem to work. I'd need to investigate that a bit more though. Are you using GM4? If so, I could prioritise this, but since most userscripts out there don't support GM4 either it hasn't been a priority for me so far. |
Did some testing, there are multiple problems with ECAU under GM4:
Some of these possibly occur under older GM versions too. IMO I should really add automated E2E tests before working on compatibility with all these different userscript engines and browsers. There are huge incompatibilities between all of these (see also #49, #59, #145, #75), so fixing a problem for one engine might break support for another one, and I can't test all of these combinations manually on every change. So running E2E tests in CI is pretty much a necessity to make sure we don't break any existing support when adding support for GM. I should also note that this only applies to ECAU for now. The other scripts are possibly (likely) also incompatible, but fixing that would be part of porting those scripts to the new build system which is a long-term effort. |
Yeah. Currently on 4.11. I’ve considered switching to one of the other engines, but when I’ve tried in the past, I’ve had to manually go around and find all "my" userscripts again and reimport them in the new one… and I just gave up on that. Maybe I’ll try again one of these days. :) |
At some point we should probably add support for userscript engines which use the GM v4 API (
GM.*
).https://github.com/greasemonkey/gm4-polyfill
#112
ECAU doesn't work on GreaseMonkey 3 either: https://chatlogs.metabrainz.org/libera/musicbrainz/msg/4903067/
Likely because of the
unsafeWindow
"feature" (because we@grant
stuff, we don't get access to the realwindow
object anymore).The text was updated successfully, but these errors were encountered: