diff --git a/4chan_x.user.js b/4chan_x.user.js index 1eae1a1b8..1803483cd 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2125,8 +2125,8 @@ this.status.className = null; break; case 200: - this.lastModified = this.req.getResponseHeader('Last-Modified'); this.parse(JSON.parse(this.req.response).posts); + this.lastModified = this.req.getResponseHeader('Last-Modified'); this.set('timer', this.getInterval()); break; default: @@ -2614,11 +2614,14 @@ }, initUnitTesting: function() { window.x = { + Conf: Conf, + g: g, UI: UI, $: $, Board: Board, Thread: Thread, Post: Post, + Clone: Clone, Main: Main, Redirect: Redirect, Build: Build, diff --git a/src/features.coffee b/src/features.coffee index 18c3f4329..43447b65a 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -1228,8 +1228,8 @@ ThreadUpdater = @set 'status', null @status.className = null when 200 - @lastModified = @req.getResponseHeader 'Last-Modified' @parse JSON.parse(@req.response).posts + @lastModified = @req.getResponseHeader 'Last-Modified' @set 'timer', @getInterval() else @unsuccessfulFetchCount++ diff --git a/src/main.coffee b/src/main.coffee index d48bf025c..4b53879bf 100644 --- a/src/main.coffee +++ b/src/main.coffee @@ -291,6 +291,9 @@ Main = initUnitTesting: -> window.x = + # globals.coffee + Conf: Conf + g: g # ui.coffee UI: UI # $.coffee @@ -299,11 +302,12 @@ Main = Board: Board Thread: Thread Post: Post + Clone: Clone Main: Main # features.coffee Redirect: Redirect Build: Build - Get: Get + Get: Get Quotify: Quotify QuoteInline: QuoteInline QuotePreview: QuotePreview