nb -> imgID

This commit is contained in:
James Campos 2011-08-24 12:59:39 -07:00
parent 531019c720
commit 9f3dcbaadd
2 changed files with 5 additions and 5 deletions

View File

@ -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";
});
}
};

View File

@ -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: ->