[Greasemonkey] Greasemonkey 0.4.2 - Voyager

Thom Wetzel thomw at lmnopc.com
Thu Jul 28 14:43:27 EDT 2005


I noticed the same thing and found a simple fix to get scripts running 
in 0.4.1. 

If you enclose your script in a function block like I've demonstrated 
below, x() should work.

(function() {
	
	x();
	
	function x(){
		alert('a');
	}
	
})();



Thom Wetzel



Matt Labrum wrote:

> this new version of GM seems to break internal function calls in 
> scripts eg
> x();
> function x(){
> alert('a');
> }
>
>
> creates errors saying x isnt defined
>
>
>     ---------- Forwarded message ----------
>     From: Aaron Boodman <zboogs at gmail.com <mailto:zboogs at gmail.com>>
>     To: greasemonkey at mozdev.org <mailto:greasemonkey at mozdev.org>
>     Date: Thu, 28 Jul 2005 03:25:13 -0700
>     Subject: [Greasemonkey] Greasemonkey 0.4.2 - Voyager
>     * Moved the profile directory to <profile-dir>/gm_scripts because Deer
>     Park deletes it on uninstall where it was before.
>
>     * Implemented a migration script for <= 0.4.1 to 0.4.2 on FF 1.0.x. On
>     Deer Park it's pointless because by the time the migration script
>     runs, the scripts have already been deleted. Deer Park users will have
>     to just be careful and backup their scripts before upgrading.
>
>     * Implemented this scope:
>
>     with (sandbox) {
>      with (unsafeWindow) {
>        with (window) {
>          // run script...
>        }
>      }
>     }
>
>     Decided to leave the variable names as they were in 0.4.1.
>
>     I'm especially interested in:
>
>     a) How the migration goes. Deer Park users should backup their scripts
>     directory and manually move it to <profDir>/gm_scripts once 0.4.2 runs
>     once. For FF 1.0.x users the upgrade should be seamless.
>
>     b) If there are any critical showstopper bugs for anyone. I'm keen to
>     get this out to beta end of this week.
>
>     Thanks for your patience everyone.
>
>     --
>     Aaron
>
>
>     _______________________________________________
>     Greasemonkey mailing list
>     Greasemonkey at mozdev.org <mailto:Greasemonkey at mozdev.org>
>     http://mozdev.org/mailman/listinfo/greasemonkey
>
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Greasemonkey mailing list
>Greasemonkey at mozdev.org
>http://mozdev.org/mailman/listinfo/greasemonkey
>  
>


More information about the Greasemonkey mailing list