Set lastchecked instead of lastupdate

This commit is contained in:
Jordan Bates 2013-05-10 16:58:29 -07:00
parent f0df5106df
commit 3315a244dc
4 changed files with 7 additions and 17 deletions

View File

@ -9318,14 +9318,12 @@
$.on(link, 'click', Settings.open);
Header.addShortcut(link);
$.get('previousversion', null, function(item) {
var changelog, curr, el, prev, previous;
var changelog, el, previous;
if (previous = item['previousversion']) {
if (previous === g.VERSION) {
return;
}
prev = previous.match(/\d+/g).map(Number);
curr = g.VERSION.match(/\d+/g).map(Number);
changelog = 'https://github.com/seaweedchan/4chan-x/blob/master/CHANGELOG.md';
el = $.el('span', {
innerHTML: "4chan X has been updated to <a href='" + changelog + "' target=_blank>version " + g.VERSION + "</a>."
@ -9335,7 +9333,7 @@
$.on(d, '4chanXInitFinished', Settings.open);
}
return $.set({
lastupdate: Date.now(),
lastchecked: Date.now(),
previousversion: g.VERSION
});
});

View File

@ -9327,14 +9327,12 @@
$.on(link, 'click', Settings.open);
Header.addShortcut(link);
$.get('previousversion', null, function(item) {
var changelog, curr, el, prev, previous;
var changelog, el, previous;
if (previous = item['previousversion']) {
if (previous === g.VERSION) {
return;
}
prev = previous.match(/\d+/g).map(Number);
curr = g.VERSION.match(/\d+/g).map(Number);
changelog = 'https://github.com/seaweedchan/4chan-x/blob/master/CHANGELOG.md';
el = $.el('span', {
innerHTML: "4chan X has been updated to <a href='" + changelog + "' target=_blank>version " + g.VERSION + "</a>."
@ -9344,7 +9342,7 @@
$.on(d, '4chanXInitFinished', Settings.open);
}
return $.set({
lastupdate: Date.now(),
lastchecked: Date.now(),
previousversion: g.VERSION
});
});

View File

@ -9310,14 +9310,12 @@
$.on(link, 'click', Settings.open);
Header.addShortcut(link);
$.get('previousversion', null, function(item) {
var changelog, curr, el, prev, previous;
var changelog, el, previous;
if (previous = item['previousversion']) {
if (previous === g.VERSION) {
return;
}
prev = previous.match(/\d+/g).map(Number);
curr = g.VERSION.match(/\d+/g).map(Number);
changelog = 'https://github.com/seaweedchan/4chan-x/blob/master/CHANGELOG.md';
el = $.el('span', {
innerHTML: "4chan X has been updated to <a href='" + changelog + "' target=_blank>version " + g.VERSION + "</a>."
@ -9327,7 +9325,7 @@
$.on(d, '4chanXInitFinished', Settings.open);
}
return $.set({
lastupdate: Date.now(),
lastchecked: Date.now(),
previousversion: g.VERSION
});
});

View File

@ -12,10 +12,6 @@ Settings =
$.get 'previousversion', null, (item) ->
if previous = item['previousversion']
return if previous is g.VERSION
# Avoid conflicts between sync'd newer versions
# and out of date extension on this device.
prev = previous.match(/\d+/g).map Number
curr = g.VERSION.match(/\d+/g).map Number
changelog = '<%= meta.repo %>blob/<%= meta.mainBranch %>/CHANGELOG.md'
el = $.el 'span',
@ -24,7 +20,7 @@ Settings =
else
$.on d, '4chanXInitFinished', Settings.open
$.set
lastupdate: Date.now()
lastchecked: Date.now()
previousversion: g.VERSION
Settings.addSection 'Main', Settings.main