diff --git a/src/features.coffee b/src/features.coffee index 78ae26539..633abcc06 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -212,10 +212,17 @@ Settings = $.get 'previousversion', null, (item) -> return if item['previousversion'] is g.VERSION + + # Avoid conflicts between sync'd newer versions + # and out of date extension on this device. + prev = item['previousversion'].match(/\d+/g).map Number + curr = g.VERSION.match(/\d+/g).map Number + return unless prev[0] >= curr[0] and prev[1] >= curr[1] and prev[2] >= curr[2] + changelog = "<%= meta.repo %>blob/<%= meta.mainBranch %>/CHANGELOG.md##{g.VERSION.replace(/\./g, '')}" el = $.el 'span', innerHTML: "<%= meta.name %> has been updated to version #{g.VERSION}." - new Notification 'info', el, 1 * $.MINUTE + new Notification 'info', el, 60 $.set 'lastupdate', Date.now() $.set 'previousversion', g.VERSION $.on d, '4chanXInitFinished', Settings.open unless item['previousversion'] diff --git a/src/main.coffee b/src/main.coffee index b1fdcb3a8..e853d17a5 100644 --- a/src/main.coffee +++ b/src/main.coffee @@ -519,7 +519,7 @@ Main = $.set 'lastchecked', now el = $.el 'span', innerHTML: "Update: <%= meta.name %> v#{version} is out, get it target=_blank>here." - new Notification 'info', el, 2 * $.MINUTE + new Notification 'info', el, 120 handleErrors: (errors) -> unless 'length' of errors