-
Notifications
You must be signed in to change notification settings - Fork 131
Description
It might appear from this piece of code's existence that New XKit notifies users when a new extension version is available. (I was looking into this to potentially delay it by, oh, 24 hours, so that in most cases users with automatic updates on would not see it frequently if we push updates).
It appears, though, that this piece of code is not called. (Also, I'm pretty sure it would be broken in certain cases if it was called, as per its "This is awful but at least it works" comment; it should be updated to have equivalent comparison logic to the shouldUpdate function in XKit Updates if we enable it. 7.11.0 is currently parsed as older than 7.10.10, if I understand correctly.)
Per git bisect, it appears to have been disabled in #1548 and the comment vanished in #1775.
This is more a "document the situation" issue than a "we should fix this" issue.
XKit/Extensions/xkit_preferences.js
Lines 347 to 390 in 43e5e17
| XKit.download.page("framework_version.php", function(mdata) { | |
| if (mdata.server_down === true) { | |
| XKit.window.show("Can't connect to server", | |
| "XKit was unable to contact the servers in order to download framework version update file. " + | |
| 'You might be using an outdated or buggy version of XKit. ' + | |
| 'Please visit <a href="http://new-xkit-extension.tumblr.com">the unofficial XKit Blog</a> for updates and details.', | |
| "error", '<div id="xkit-close-message" class="xkit-button default">OK</div>'); | |
| return; | |
| } | |
| // This is awful but at least it works. | |
| var my_version = parseFloat(XKit.tools.replace_all(XKit.version, "\\.", "")); | |
| var mb_object; | |
| var new_version; | |
| if (XKit.browser().firefox === true && | |
| typeof XKit.extensions.xkit_preferences.news.return_browser_from_framework_data("firefox", mdata) !== "undefined") { | |
| mb_object = XKit.extensions.xkit_preferences.news.return_browser_from_framework_data("firefox", mdata); | |
| } | |
| if (XKit.browser().safari === true && | |
| typeof XKit.extensions.xkit_preferences.news.return_browser_from_framework_data("safari", mdata) !== "undefined") { | |
| mb_object = XKit.extensions.xkit_preferences.news.return_browser_from_framework_data("safari", mdata); | |
| } | |
| new_version = parseFloat(XKit.tools.replace_all(mb_object.version, "\\.", "")); | |
| if (new_version > my_version) { | |
| XKit.notifications.add("<b>Please update XKit!</b><br/>A new version of XKit is available for your browser. " + | |
| "Please click here for more information and how you can easily and quickly update now.", "warning", true, function() { | |
| XKit.window.show("Please update XKit", | |
| "<b>A new version of XKit, version " + mb_object.version + " is available.</b><br/>" + | |
| "You are currently using XKit version " + XKit.version + ".<br/><br/>" + | |
| "Please update to the latest version as soon as possible. If you don't, XKit might not work properly, " + | |
| "or might not work at all in the future.<br/><br/>All you have to do is to go to the XKit download page, " + | |
| "and re-download XKit. XKit will update itself, and all your settings will be preserved.", | |
| "warning", | |
| '<a class="xkit-button default" href="https://new-xkit-extension.tumblr.com/downloads">Go to Download page</a>' + | |
| '<div class="xkit-button" id="xkit-close-message">Not now, remind me later.</div>'); | |
| }); | |
| } |