From 9f3dcbaadd0ba1cd5585b5cbc88ef6935ebceac1 Mon Sep 17 00:00:00 2001 From: James Campos Date: Wed, 24 Aug 2011 12:59:39 -0700 Subject: [PATCH] nb -> imgID --- 4chan_x.user.js | 6 +++--- script.coffee | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 709e4fa7d..43d8b95db 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1988,14 +1988,14 @@ revealSpoilers = { init: function() { return g.callbacks.push(function(root) { - var board, img, nb, _, _ref; + var board, img, imgID, _, _ref; if (!(img = $('img[alt^=Spoiler]', root)) || root.className === 'inline') { return; } img.removeAttribute('height'); img.removeAttribute('width'); - _ref = img.parentNode.href.match(/(\w+)\/src\/(\d+)/), _ = _ref[0], board = _ref[1], nb = _ref[2]; - return img.src = "http://0.thumbs.4chan.org/" + board + "/thumb/" + nb + "s.jpg"; + _ref = img.parentNode.href.match(/(\w+)\/src\/(\d+)/), _ = _ref[0], board = _ref[1], imgID = _ref[2]; + return img.src = "http://0.thumbs.4chan.org/" + board + "/thumb/" + imgID + "s.jpg"; }); } }; diff --git a/script.coffee b/script.coffee index 1f1d752ce..bb9e9a59f 100644 --- a/script.coffee +++ b/script.coffee @@ -1604,8 +1604,8 @@ revealSpoilers = return if not (img = $ 'img[alt^=Spoiler]', root) or root.className is 'inline' img.removeAttribute 'height' img.removeAttribute 'width' - [_, board, nb] = img.parentNode.href.match /(\w+)\/src\/(\d+)/ - img.src = "http://0.thumbs.4chan.org/#{board}/thumb/#{nb}s.jpg" + [_, board, imgID] = img.parentNode.href.match /(\w+)\/src\/(\d+)/ + img.src = "http://0.thumbs.4chan.org/#{board}/thumb/#{imgID}s.jpg" Time = init: ->