YousableTubeFix

By Mindeye Last update Feb 2, 2012 — Installed 594,962 times.

Inspired by update-check functionality

in
Subscribe to Inspired by update-check functionality 4 posts, 2 voices



gabedibble Scriptwright

Mindeye,

Thank you my friend for the inspirational and well written auto-update functionality! I had been using 'User Script Updates' for some time with my 'Google i&Search Dark + Enhancements' (http://userscripts.org/scripts/show/12917) script to turn Google services black, until the update-checking stopped working reliably with a recent FF-version-update. I noticed the code your wrote/added and was inspired by its simplicity and efficiency. I then grabbed the few functions and variables and got it working. I really am thankful for your effort in the update checker! Great job and keep up the good work! =)

Best regards,
Gabe D

 
Mindeye Script's Author

Thanks for your compliments. I'm glad you found the functions useful ;-)

 
gabedibble Scriptwright
FirefoxWindows

Mindeye,

First I must thank you again for the auto-update functions!

Second, I made a small improvement (usability-wise) to the functionality and thought I'd share back:

When the update notification pops up, and you click install, it does bring up the install dialog, but the notification is still there & gsscriptVersionNotificationHide is not set to 1.

If you add id='gsscriptVersionInstallUpdate' to your Install link, like I did here:

"< a style='color:#fcc !important; font-size:16px; font-family:Trebuchet MS, Verdna;' id='gsscriptVersionInstallUpdate' href='" + scriptFileURL + "' title='Install the script update now'><blink>INSTALL UPDATE</blink>" +
(had to put a space at the front and back A tags)

Then add a second listener below the first listener, like this:

// Adds event listeners to the hide update-notice upon Install or Hide
$("gsscriptVersionInstallUpdate").addEventListener("click", function(evt) {
	sSt.gsscriptVersionNoticeHide = "1"; // Sets a sessionStorage variable to prevent the notice to be shown for this session
	scriptShowUpdateMessage(false, null);
}, false);
$("gsscriptVersionMessageHide").addEventListener("click", function(evt) {
	sSt.gsscriptVersionNoticeHide = "1";
	scriptShowUpdateMessage(false, null);
}, false);

Then when the user clicks the updater 'INSTALL' link, the notification goes away and the update check is postponed for X[in our case, 24h]

Not a drastic change but a good usability improvement.
Hope you like the idea

Best regards, GD


PS: I diff your script from time to time to see if you've made update-check mods, but haven't seen any thus far. Kudos on the well written code!

 
Mindeye Script's Author
FirefoxWindows

You're right, but I think it is better if we just hide the notification calling scriptShowUpdateMessage(false, null). Activating gsscriptVersionNoticeHide would hide the update notification for the session, but the user can click Cancel in the script install dialog so the script wouldn't be updated.

I'll add that change to the next YousableTubeFix version.

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