nb -> imgID
This commit is contained in:
parent
531019c720
commit
9f3dcbaadd
@ -1988,14 +1988,14 @@
|
|||||||
revealSpoilers = {
|
revealSpoilers = {
|
||||||
init: function() {
|
init: function() {
|
||||||
return g.callbacks.push(function(root) {
|
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') {
|
if (!(img = $('img[alt^=Spoiler]', root)) || root.className === 'inline') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
img.removeAttribute('height');
|
img.removeAttribute('height');
|
||||||
img.removeAttribute('width');
|
img.removeAttribute('width');
|
||||||
_ref = img.parentNode.href.match(/(\w+)\/src\/(\d+)/), _ = _ref[0], board = _ref[1], nb = _ref[2];
|
_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/" + nb + "s.jpg";
|
return img.src = "http://0.thumbs.4chan.org/" + board + "/thumb/" + imgID + "s.jpg";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1604,8 +1604,8 @@ revealSpoilers =
|
|||||||
return if not (img = $ 'img[alt^=Spoiler]', root) or root.className is 'inline'
|
return if not (img = $ 'img[alt^=Spoiler]', root) or root.className is 'inline'
|
||||||
img.removeAttribute 'height'
|
img.removeAttribute 'height'
|
||||||
img.removeAttribute 'width'
|
img.removeAttribute 'width'
|
||||||
[_, board, nb] = img.parentNode.href.match /(\w+)\/src\/(\d+)/
|
[_, board, imgID] = img.parentNode.href.match /(\w+)\/src\/(\d+)/
|
||||||
img.src = "http://0.thumbs.4chan.org/#{board}/thumb/#{nb}s.jpg"
|
img.src = "http://0.thumbs.4chan.org/#{board}/thumb/#{imgID}s.jpg"
|
||||||
|
|
||||||
Time =
|
Time =
|
||||||
init: ->
|
init: ->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user