diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 154beee3a..188c43b10 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -2450,13 +2450,12 @@ return $.add(strong, a); }, update: function(pageNum) { - var board, now, onload, _ref, _ref1; + var now, onload, _ref, _ref1; if (!navigator.onLine) { return; } - if (d.readyState !== 'loading' && Index.root.parentElement) { - board = $('.board'); - $.replace(board, Index.root); + if (!(d.readyState === 'loading' || Index.root.parentElement)) { + $.replace($('.board', Index.root)); } if ((_ref = Index.req) != null) { _ref.abort(); diff --git a/builds/crx/script.js b/builds/crx/script.js index da0e6ad04..e25885262 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -2460,13 +2460,12 @@ return $.add(strong, a); }, update: function(pageNum) { - var board, now, onload, _ref, _ref1; + var now, onload, _ref, _ref1; if (!navigator.onLine) { return; } - if (d.readyState !== 'loading' && Index.root.parentElement) { - board = $('.board'); - $.replace(board, Index.root); + if (!(d.readyState === 'loading' || Index.root.parentElement)) { + $.replace($('.board', Index.root)); } if ((_ref = Index.req) != null) { _ref.abort(); diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 27d47a0fa..233ec84a1 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -203,9 +203,8 @@ Index = update: (pageNum) -> return unless navigator.onLine - if d.readyState isnt 'loading' and Index.root.parentElement - board = $ '.board' - $.replace board, Index.root + unless d.readyState is 'loading' or Index.root.parentElement + $.replace $ '.board', Index.root Index.req?.abort() Index.notice?.close()