diff --git a/CHANGELOG.md b/CHANGELOG.md index b3b04ffcf..9f7c26991 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +- Removed the `Check for Updates` setting: + - Your browser/userscript manager should handle updates itself automatically. + ## 3.6.0 - *2013-08-10* - **New feature**: `Show Dice Roll` diff --git a/src/General/Config.coffee b/src/General/Config.coffee index 7cbc64d18..7277f3897 100644 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -13,7 +13,6 @@ Config = 'Index Navigation': [false, 'Add buttons to navigate between threads.'] 'Reply Navigation': [false, 'Add buttons to navigate to top / bottom of thread.'] 'Show Dice Roll': [true, 'Show dice that were entered into the email field.'] - 'Check for Updates': [true, 'Notify when updated versions of <%= meta.name %> are available.'] 'Filtering': 'Anonymize': [false, 'Make everyone Anonymous.'] 'Filter': [true, 'Self-moderation placebo.'] diff --git a/src/General/Main.coffee b/src/General/Main.coffee index 92a543676..eb10afe7f 100644 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -210,7 +210,6 @@ Main = <% } %> $.event '4chanXInitFinished' - Main.checkUpdate() callbackNodes: (klass, nodes) -> # get the nodes' length only once @@ -244,52 +243,6 @@ Main = obj.callback.isAddon = true Klass::callbacks.push obj.callback - checkUpdate: -> - return unless Conf['Check for Updates'] and Main.isThisPageLegit() - # Check for updates after 7 days since the last update. - # After that, check for updates every day if we still haven't updated. - now = Date.now() - freq = 7 * $.DAY - items = - lastupdate: 0 - lastchecked: 0 - $.get items, (items) -> - if items.lastupdate > now - freq or items.lastchecked > now - $.DAY - return - $.ajax '<%= meta.page %><%= meta.buildsPath %>version', onload: -> - return unless @status is 200 - version = @response - return unless /^\d\.\d+\.\d+$/.test version - if g.VERSION is version - # Don't check for updates too frequently if there wasn't one in a 'long' time. - $.set 'lastupdate', now - return - $.set 'lastchecked', now - # dmichnowicz - # 19 juin 2013 09:39:28 - # innerHTML is not allowed in conjunction with external resources: [...] - # - # mayhemydg - # 19 juin 2013 09:43:14 - # Will it be good if I make sure to match a version number? - # - # dmichnowicz - # 19 juin 2013 09:46:12 - # Yes. - # - # mayhemydg - # 19 juin 2013 13:04:30 - # Well actually there is nothing to fix, the following code makes sure this is a - # valid version number and precedes the innerHTML part: [see /^\d\.\d+\.\d+$/.test] - # - # dmichnowicz - # 21 juin 2013 04:52:37 - # OK but anyway please remove that line of code. - el = $.el 'span', - textContent: "Update: <%= meta.name %> v#{version} is out, get it " - el.innerHTML += ' target=_blank>here.' - new Notification 'info', el, 120 - handleErrors: (errors) -> unless errors instanceof Array error = errors diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee index 660d78f78..e5241d37d 100644 --- a/src/General/Settings.coffee +++ b/src/General/Settings.coffee @@ -38,7 +38,6 @@ Settings = $.set archives: Conf['archives'] lastarchivecheck: now - lastupdate: now previousversion: g.VERSION Settings.addSection 'Main', Settings.main