Script Update Checker

By Jarett Last update Apr 30, 2009 — Installed 16,093 times.

Inconsistent SUC_current_version?

in
Subscribe to Inconsistent SUC_current_version? 2 posts, 1 voice



RonL Scriptwright
FirefoxX11

I really like your script, but I have noticed some inconsistency in its ability to set SUC_current_version after the user answers 'OK' to 'Would you like to go to the install page now?' In all cases, it successfully sets SUC_last_update.

This seems to happen in both forced and unforced modes.

It happens in Firefox 3.6 on both Ubuntu and WinXP.

I noticed that the script uses GM_setValue('SUC_current_version', remote_version); in one place and GM_setValue('SUC_current_version', remote_version+''); in another. I also found SUC_current_version to be Type=string on one machine and Type=integer on another. Forcing Type=string made no improvement, nor did editing the script to force GM_setValue('SUC_current_version', remote_version+''); in both places.

Any thoughts on what could be causing this?

 
RonL Scriptwright
FirefoxX11

I suspect that it might have something to do with the change in focus to a new tab. When I reversed the order of the statements GM_openInTab and GM_setValue, it seems to have helped.

(By the way, I neglected to mention that I use the compact (one-line) version of the function. It seems to be an accurate copy of the original.)