diff --git a/4chan_x.user.js b/4chan_x.user.js index 4cd222a50..0fd71b658 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -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) { diff --git a/script.coffee b/script.coffee index 7479b2ebc..3d6982a33 100644 --- a/script.coffee +++ b/script.coffee @@ -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