Friday, October 21, 2011

Greasemonkey 0.9.13 beta1

Greasemonkey release 0.9.13 should include complete automatic in-the-backgroudn updating of user scripts. As yet there are no docs for script authors but the short version is: put an @version in your metadata, and increase it when there is an update.

Greasemonkey 0.9.13 beta1 is now available for testing. It's in the Mozilla Add-ons beta channel. Open the "Development Channel" drop down at the bottom of the page, and click the "Add to Firefox" button.

I have tried to follow if you are working on the bug where "@run-at document-start" causes scripts to never execute in frames, but so far I've only seen closed issues.

Regarding whether or not it is a bug or the expected behaviour, clearly it is the former. The expected behaviour is that Greasemonkey run scripts in all frames, as it has been doing before.Anyway, I'd like to quote a reply I saw regarding the problem:

Re: "Does the current code still execute scripts in iframes when they are set to run at document-start?"

- "I don't think running at the wrong time is good, either."

I would then like to counter with another quotation:

Re: "If we should plan on supporting additional states such as document-end or document-idle is another question"

- "No. Our general policy is that we don't implement for the authors anything that they can implement themselves."

As such, it would clearly be the author's responsibility to implement a simple check if Greasemonkey is executing scripts at the standard time or at document-start. As it is now, the author cannot even do that and have as such no way to recover from that error/bug. (Except either extensively rewriting the script for the top frame to take on GM's duties or have two different versions of the script.)

Well, anyway, I have for quite some time secretly wished for the functionality that document-start would bring so I was a bit shocked when it arrived and shocked again when it did not work as expected. Although, my main use would have been to (optionally) set style="display: none;" on the html tag in order to remove flickering (especially since I remove and/or move elements around on the pages) while loading and maybe increase rendering speed (only flow the page once instead of a flow and a reflow).

PS. I'm also interested to know if .meta.js is used or not (in conjunction with Etag and/or modified) in update searches!

1)The menu graying when you right click a userscript seems to be broken with this version.The only time it correctly disables 2 menu entries is on the *last* script to execute.All other entries have *all* menu entries accessible...

2) When manually checking for updates by right-clicking the userscript etc, you are no longer prompted to update...it automatically updates when it finds one.

> What about scripts that have been installed since Firefox 3.x days?GM has been tracking these install locations since version 0.9.0 in preparation of update checking. So all scripts you've installed since then should now automatically check for updates.

>I hope that GM will take in account that it's not secure to auto-update via HTTP

Yes, in the GM options dialog you can require the script update securely.

> and that using .user.js instead of .meta.js can bring down sites?

GM automatically uses .meta.js when checking for updates of script installed from userscripts.org.

> Oh, and besides, any chance you will use the Scriptish @updateURL property?

The @updateURL property is used to set where to check for updates. You can set this to .meta.js file to save you some bandwidth. This doesn't set where to install the update from. The install url is used by default and you can use @installURL to override this.

My facebook scripts aren't working at all. I've tried everything (system restore, un/reinstalling, creating new user profile...). Greasemonkey is showing as enabled incl user scripts but i can't view them at all.Please, can someone help me with a solution?