Fix 403 error with the updater script.

This commit is contained in:
Nicolas Stepien 2012-06-20 16:53:13 +02:00
parent 5d36d08280
commit 6f0c16bf3a
2 changed files with 8 additions and 6 deletions

View File

@ -4366,13 +4366,13 @@
Main.addStyle();
now = Date.now();
if (Conf['Check for Updates'] && $.get('lastUpdate', 0) < now - 6 * $.HOUR) {
$.on(window, 'message', Main.message);
$.ready(function() {
$.on(window, 'message', Main.message);
$.set('lastUpdate', now);
return $.add(d.head, $.el('script', {
src: 'https://raw.github.com/mayhemydg/4chan-x/master/latest.js'
src: 'https://github.com/MayhemYDG/4chan-x/raw/master/latest.js'
}));
});
$.set('lastUpdate', now);
}
g.hiddenReplies = $.get("hiddenReplies/" + g.BOARD + "/", {});
if ($.get('lastChecked', 0) < now - 1 * $.DAY) {

View File

@ -3380,9 +3380,11 @@ Main =
now = Date.now()
if Conf['Check for Updates'] and $.get('lastUpdate', 0) < now - 6*$.HOUR
$.on window, 'message', Main.message
$.ready -> $.add d.head, $.el 'script', src: 'https://raw.github.com/mayhemydg/4chan-x/master/latest.js'
$.set 'lastUpdate', now
$.ready ->
$.on window, 'message', Main.message
$.set 'lastUpdate', now
$.add d.head, $.el 'script',
src: 'https://github.com/MayhemYDG/4chan-x/raw/master/latest.js'
g.hiddenReplies = $.get "hiddenReplies/#{g.BOARD}/", {}
if $.get('lastChecked', 0) < now - 1*$.DAY