Please beta test Greasemonkey 4.0

325 views
Skip to first unread message

Anthony Lieuallen

unread,
Oct 25, 2017, 12:18:25 PM10/25/17
to greasemon...@googlegroups.com, greasemo...@googlegroups.com
You can read more at the announcement post, Greasemonkey 4 is coming.  It's a complete re-write to be Firefox 57/WebExtensions compatible.

There's some known missing features and changes.  But it will keep working after Firefox 57 (scheduled for release in under three weeks).  You can install and test it now: https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/versions/beta

It would be quite useful if you could install it and try it out.  Report back here: what works well?  What doesn't work well?  (And please, be constructive with your feedback.)


Right now my plan is to push version 4.0 as the stable version by the end of next week.  Any good or bad feedback here will help me know to hurry even sooner, or hold off for major issues.  Thanks in advance!

Patrick Dark

unread,
Oct 25, 2017, 7:45:01 PM10/25/17
to greasemonkey-users
I'd put a big flashy (red?) box at the top of the “Get User Scripts” page at https://wiki.greasespot.net/User_Script_Hosting indicating that the old drag and drop method of installing User Scripts no longer works and that *new* scripts must be installed via HTTP/HTTPS instead of by copying and pasting into an empty text field. This would help old school Greasemonkey users understand the new Greasemonkey.

Maybe also mention that such a text entry interface is coming if there are plans for it. My first instinct is to look for a text box to paste new scripts into. (You have a cloud-based text box at https://gist.github.com/, but since "private" "secret gist" URLs are merely hidden from search engines and can presumably be publicly accessed, I would never use this service.)

damo....@gmail.com

unread,
Oct 30, 2017, 12:03:09 AM10/30/17
to greasemonkey-users

On Thursday, October 26, 2017 at 2:18:25 AM UTC+10, Anthony Lieuallen wrote:

It would be quite useful if you could install it and try it out.  Report back here: what works well?  What doesn't work well?  (And please, be constructive with your feedback.)

Hey Anthony,

I'm happy to say that after porting my more substantial script over to GM4, it is working very well.  I haven't uncovered any issues.  I still have some final touches to apply, but all appears well.

The APIs that my script uses (and thus has tested):

GM.getValue
GM.setValue
GM.info
GM.xmlHttpRequest

You have done a remarkable job with GM5 in quite a short period of time.  Congrats to you. :)

I have also tested backward compatibility with GM3 and Tampermonkey using your polyfill, and with the bug fixes I applied (see https://gist.github.com/damoclark/9a43d8c405d4c72e2325bdabd80496f0), it also works well.

Thanks for all your work on GM and keeping it operational post FF57.

Damo.

klekc

unread,
Oct 30, 2017, 6:43:02 AM10/30/17
to greasemonkey-users


Am Donnerstag, 26. Oktober 2017 01:45:01 UTC+2 schrieb Patrick Dark:
I'd put a big flashy (red?) box at the top of the “Get User Scripts” page at https://wiki.greasespot.net/User_Script_Hosting indicating that the old drag and drop method of installing User Scripts no longer works and that *new* scripts must be installed via HTTP/HTTPS instead of by copying and pasting into an empty text field.
I second that. I was completely lost at the beginning on how I can add my scripts ( after realizing that scripts from greasespot were working, I started my local webserver, copied over my scripts and was able to add them, at least @require files were added automatically ). I understand that this is critical due to Mozilla blocking direct file access, but it should be better described how to add scripts. Anyone who has a shorter workaround?

Changing and saving scripts with the internal editor is another story. There's no save button and it took me some time to realize that you need to use "Ctrl+s". Guess a small description could not hurt here ;)

In addition, my most concern is that GM WE has no setting for "Global Excludes", sites where all scripts are always disabled. Is this planned for the WE version?

Of course I use many scripts that require "@run-at document-start" and see many sites where my script is loaded too late. I hope that https://bugzilla.mozilla.org/show_bug.cgi?id=1332273 will fix this. At least I can use some functionality of my scripts in FF57 until this is ready.

Nevertheless, I don't want to sound too negative here. Thanks for your year long discussions, planning & collabaorations with Mozilla and WE APIs, Anthony. Without Greasemonky FF would be seriously lacking behind ;)

Anthony Lieuallen

unread,
Oct 30, 2017, 9:46:22 AM10/30/17
to greasemon...@googlegroups.com
On Mon, Oct 30, 2017 at 6:43 AM, 'klekc' via greasemonkey-users <greasemon...@googlegroups.com> wrote:
In addition, my most concern is that GM WE has no setting for "Global Excludes", sites where all scripts are always disabled. Is this planned for the WE version?

Absolutely.  That and per-script includes/excludes.  Just can't do everything in time.
 
Of course I use many scripts that require "@run-at document-start" and see many sites where my script is loaded too late. I hope that https://bugzilla.mozilla.org/show_bug.cgi?id=1332273 will fix this. At least I can use some functionality of my scripts in FF57 until this is ready.

I agree.  I'm worried that this will never work as desired again, without dirty hacks like keeping all scripts (and all dependencies) 100% in memory, in every content process.

damo....@gmail.com

unread,
Oct 31, 2017, 6:27:19 AM10/31/17
to greasemonkey-users
Hey Anthony,

In your beta12 version, when you click on the script from the GM button, disable the script, and then click the left arrow to return to the main menu list, it doesn't save the change (i.e. doesn't disable the script).  If you click back into the script again, it will still show as enabled.

If however, you click disable and then click outside of the menu entirely, the change is saved.

On a related matter, would it be possible to put the version number of the script along side its name when clicking the GM button in the menu?  Otherwise, to find out the version, you need to edit the script to view the metadata.

D.


On Thursday, October 26, 2017 at 2:18:25 AM UTC+10, Anthony Lieuallen wrote:

Anthony Lieuallen

unread,
Oct 31, 2017, 9:08:26 AM10/31/17
to greasemon...@googlegroups.com
On Tue, Oct 31, 2017 at 6:27 AM, <damo....@gmail.com> wrote:
In your beta12 version, when you click on the script from the GM button, disable the script, and then click the left arrow to return to the main menu list, it doesn't save the change (i.e. doesn't disable the script).  If you click back into the script again, it will still show as enabled.

If however, you click disable and then click outside of the menu entirely, the change is saved.

Thanks for this!

It's actually saved, but the detail view falls out of date for some reason.
 
On a related matter, would it be possible to put the version number of the script along side its name when clicking the GM button in the menu?  Otherwise, to find out the version, you need to edit the script to view the metadata.

Plans are to put a bunch more stuff in the detail view, but I can only get so much done in time for Firefox 57.

Smylers

unread,
Nov 3, 2017, 11:57:01 AM11/3/17
to greasemonkey-users
On October 25th Anthony Lieuallen wrote:

Greasemonkey 4 is coming.  It's a complete re-write to be Firefox 57/WebExtensions compatible.

Thank you so much — I've been missing Greasemonkey since Firefox Dev Edition upgraded to 57, so was delighted when Greasemonkey updated itself yesterday.
 
It would be quite useful if you could install it and try it out.  Report back here: what works well?  What doesn't work well?  (And please, be constructive with your feedback.)

I'm a user of a single user script that I wrote myself, so quite inexperienced with Greasemonkey of any version.

How to add my script was baffling. The blog posts mention that only the built-in editor is available now, not editing files directly on the file-system. So I spent quite some time looking for how to open the built-in editor, or a ‘new user script’ menu entry or similar.

In the process of not finding that, I stumbled upon the ‘Get User Scripts’ menu item. That took me to a page whose first entry says that GitHub's Gist service can be used for hosting user scripts, so I pasted my script in there and went to the raw URL. The raw script was displayed in the browser, but it still wasn't clear what the process should be for getting it into Greasemonkey — I tried dragging the URL icon onto the Greasemonkey icon, and all sorts of things!

I went through the debugging steps on the website and couldn't see anything relevant. Eventually I tried sticking my script on a web server, and discovered that when visiting it Greasemonkey just intercepts the URL and provides an install option. It's all working fine. Thank you!

But it was far from clear from either the ‘user’ or ‘script author’ blog posts that that was what was required — probably cos I'm neither a user of publicly posted scripts nor an author of one, so the whole ‘hosting’ side was new to me.

Seeking help on what was going on led me to this mailing list, and further down this thread somebody linked to a GitHub issue. Learning of the issues list, a quick search revealed the following issue, which explains why Gist no longer works for install: https://github.com/greasemonkey/greasemonkey/issues/2631

So I think the biggest problem is that the in-app ‘Get User Scripts’ link goes to a page which recommends a service that no longer works.

Best wishes

Smylers

Anthony Lieuallen

unread,
Nov 3, 2017, 12:05:50 PM11/3/17
to greasemon...@googlegroups.com
On Fri, Nov 3, 2017 at 11:57 AM, Smylers <smy...@stripey.com> wrote:
How to add my script was baffling. The blog posts mention that only the built-in editor is available now, not editing files directly on the file-system. So I spent quite some time looking for how to open the built-in editor, or a ‘new user script’ menu entry or similar.

The "new script" feature is one of the many things that didn't make the cut for the first version, it will come.  For now as a temporary dirty workaround: Just install (from the web) any script.  Then edit it, replace the whole thing to become what you want it to be.
 
In the process of not finding that, I stumbled upon the ‘Get User Scripts’ menu item. That took me to a page whose first entry says that GitHub's Gist service can be used for hosting user scripts, so I pasted my script in there and went to the raw URL. The raw script was displayed in the browser, but it still wasn't clear what the process should be for getting it into Greasemonkey — I tried dragging the URL icon onto the Greasemonkey icon, and all sorts of things!

Oops!  I'm working on updating the wiki today.  You got hit by #2631, which you mention eventually finding.
 
But it was far from clear from either the ‘user’ or ‘script author’ blog posts that that was what was required — probably cos I'm neither a user of publicly posted scripts nor an author of one, so the whole ‘hosting’ side was new to me.

Yeah, you're probably not a typical user.  Firefox 57 was a hard deadline -- I wanted something that partially works rather than nothing at all.
 
Seeking help on what was going on led me to this mailing list, and further down this thread somebody linked to a GitHub issue. Learning of the issues list, a quick search revealed the following issue, which explains why Gist no longer works for install: https://github.com/greasemonkey/greasemonkey/issues/2631

So I think the biggest problem is that the in-app ‘Get User Scripts’ link goes to a page which recommends a service that no longer works.

I'll make sure to take that into account as I'm updating the documentation in the wiki, thanks.

Cerberus

unread,
Nov 14, 2017, 3:17:57 PM11/14/17
to greasemonkey-users
Thank you so much for updating Greasemonkey! I'm very happy you got it to work. Now I can stay with Firefox. I've successfully migrated my first script to the new version.

Observations:

1. As mentioned elsewhere, it took me quite a while to find out that there is no way to create a new script. I managed to install a random script from the Internet and copy-paste my script into it, as I see you recommend as well.

2. I'm not a programmer, so perhaps I'm stupid; but at first it wasn't clear to me that the polyfill thingy was only for backwards compatibility, not forward. After reading the blog updates, I didn't know I had to actually change e.g. GM_xmlhttpRequest into GM.xmlHttpRequest all over the script. Once I figured that out, it worked! Yay.

3. I'm still getting a rather cryptic error message in the web console (control-J):
<unavailable>
By the way, the reference (on the same line on the right side) is to something like "name-of-script:1644". When I click on that, a new tab opens on the address "view-source:user-script:name-of-script". Firefox says it cannot handle the address and gives some sort of error message. But that was probably to be expected; I read somewhere that this part was not finished yet. But the error message itself, what is it trying to tell me? The script just works.

Thank you again!
Reply all
Reply to author
Forward
0 new messages