[Greasemonkey] Making a script compatible with GM 0.5.3 and GM 0.6.4

Blake West blakewest at gmail.com
Thu Dec 1 15:00:45 EST 2005


If I need to change the values of some variables declared on the target
website, do I just need to do something like the following to make a script
compatible with GM 0.6.4 and 0.5.3?

if(unsafeWindow){
    w = unsafeWindow;
}
else{
    w = window;
}

w.variableToBeChanged = newValue;

Thanks,
--
Blake


More information about the Greasemonkey mailing list