User Script Updates

By Richard Gibson Last update Jan 3, 2012 — Installed 395,634 times.

Fix for it asking to update itself

in
Subscribe to Fix for it asking to update itself 5 posts, 5 voices



Otto42 User

If you have a recent version of greasemonkey, then this script asks to update itself on every page. Annoying. Here's the fix:

Around line 595, you'll find this:
function setStoredValue (strName, varValue) {
try {
if (GM_setValue && GM_setValue !== win.GM_setValue) {
GM_setValue(strName, varValue);
}
} catch (ex) {}
return varValue;
};

Change that to this:
function setStoredValue (strName, varValue) {
try {
if (GM_setValue && GM_setValue !== win.GM_setValue) {
window.setTimeout(function() {
GM_setValue(strName, varValue);
}, 0);

}
} catch (ex) {}
return varValue;
};

Problem solved.

 
queeup Scriptwright

thx

 
tj111 Scriptwright

Worked for me so far, thanks. Here is what the new function should look like formatted correctly.

function setStoredValue (strName, varValue) {
	try {
		if (GM_setValue && GM_setValue !== win.GM_setValue) {
			window.setTimeout(function(){
				GM_setValue(strName, varValue)
			}, 0);
		}
	} catch (ex) {}
	return varValue;
};

 
xanderificus User
FirefoxWindows

Can't the script *itself* be updated, rather than needing patched by the user?

I updated it 5 minutes ago and I've already had to turn it off in GM. Status: broken.

 
Richard Gibson Script's Author
FirefoxWindows

I don't quite understand your request, xanderificus. Were you successfully using this script before today? I was under the impression that people had moved on to other things, but if I'm wrong then I'll restore this one and put my new auto-update code elsewhere until I have a proper replacement. But with in-script updates being so easy to implement, I personally have come around to preferring them over an integrated manager that still requires special code anyway.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel