From d846449d19bcf12846579a3d53a75db5e0cb9c39 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Fri, 7 Sep 2012 22:22:58 +0200 Subject: [PATCH] Fix previous tweak. --- 4chan_x.user.js | 3 ++- script.coffee | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 81c515f77..86808f414 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2852,13 +2852,14 @@ this.unsuccessfulFetchCount = 0; this.lastModified = '0'; $.ajax("//api.4chan.org/" + g.BOARD + "/res/" + g.THREAD_ID + ".json", { - type: 'head', onload: function() { if (this.status !== 200) { return; } return Updater.lastModified = this.getResponseHeader('Last-Modified'); } + }, { + type: 'head' }); _ref = $$('input', dialog); for (_i = 0, _len = _ref.length; _i < _len; _i++) { diff --git a/script.coffee b/script.coffee index fec950281..d29f6f128 100644 --- a/script.coffee +++ b/script.coffee @@ -2281,11 +2281,11 @@ Updater = @unsuccessfulFetchCount = 0 @lastModified = '0' - $.ajax "//api.4chan.org/#{g.BOARD}/res/#{g.THREAD_ID}.json", - type: 'head' + $.ajax "//api.4chan.org/#{g.BOARD}/res/#{g.THREAD_ID}.json", { onload: -> return if @status isnt 200 Updater.lastModified = @getResponseHeader 'Last-Modified' + }, type: 'head' for input in $$ 'input', dialog if input.type is 'checkbox'