From d34284a8d0cddde3e475e6ee4b37c232e6b45ba2 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Thu, 16 Jan 2014 04:31:27 -0700 Subject: [PATCH] I misunderstood: we're not caching the result with lastmodified. --- builds/4chan-X.user.js | 6 +++--- builds/crx/script.js | 6 +++--- src/General/Index.coffee | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 3ea1d8519..ba25d1e63 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -2554,7 +2554,7 @@ onabort: onload, onloadend: onload }, { - whenModified: true + whenModified: Index.board === ("" + g.BOARD) }); return $.addClass(Index.button, 'fa-spin'); }, @@ -2585,9 +2585,9 @@ return; } Navigate.title(); + Index.board = "" + g.BOARD; try { - if (req.status === 200 || Index.board !== ("" + g.BOARD)) { - Index.board = "" + g.BOARD; + if (req.status === 200) { Index.parse(JSON.parse(req.response), pageNum); } else if (req.status === 304 && (pageNum != null)) { Index.pageNav(pageNum); diff --git a/builds/crx/script.js b/builds/crx/script.js index ac9efb420..c68e169e8 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -2564,7 +2564,7 @@ onabort: onload, onloadend: onload }, { - whenModified: true + whenModified: Index.board === ("" + g.BOARD) }); return $.addClass(Index.button, 'fa-spin'); }, @@ -2595,9 +2595,9 @@ return; } Navigate.title(); + Index.board = "" + g.BOARD; try { - if (req.status === 200 || Index.board !== ("" + g.BOARD)) { - Index.board = "" + g.BOARD; + if (req.status === 200) { Index.parse(JSON.parse(req.response), pageNum); } else if (req.status === 304 && (pageNum != null)) { Index.pageNav(pageNum); diff --git a/src/General/Index.coffee b/src/General/Index.coffee index 1959cdb1f..f01dc7dc2 100644 --- a/src/General/Index.coffee +++ b/src/General/Index.coffee @@ -247,7 +247,7 @@ Index = onabort: onload onloadend: onload , - whenModified: true + whenModified: Index.board is "#{g.BOARD}" $.addClass Index.button, 'fa-spin' load: (e, pageNum) -> @@ -274,10 +274,10 @@ Index = return Navigate.title() + Index.board = "#{g.BOARD}" try - if req.status is 200 or Index.board isnt "#{g.BOARD}" - Index.board = "#{g.BOARD}" + if req.status is 200 Index.parse JSON.parse(req.response), pageNum else if req.status is 304 and pageNum? Index.pageNav pageNum