From fc15e91749699180c2bcda95340a4b8809591e13 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Thu, 24 Nov 2011 00:40:43 +0100 Subject: [PATCH] Use full pictures for sauce --- 4chan_x.user.js | 7 +++---- script.coffee | 5 ++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index ecf263333..1bbbdb7e6 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2115,10 +2115,9 @@ return prefix.match(/(\w+)\./)[1]; }); return g.callbacks.push(function(root) { - var i, link, prefix, span, suffix, thumb, _len, _ref, _results; - if (root.className === 'inline' || !(thumb = $('img[md5]', root))) return; - span = $('.filesize', root); - suffix = thumb.src; + var i, link, prefix, span, suffix, _len, _ref, _results; + if (root.className === 'inline' || !(span = $('.filesize', root))) return; + suffix = $('a', span).href; _ref = sauce.prefixes; _results = []; for (i = 0, _len = _ref.length; i < _len; i++) { diff --git a/script.coffee b/script.coffee index c1692e92c..5557bdf04 100644 --- a/script.coffee +++ b/script.coffee @@ -1649,9 +1649,8 @@ sauce = sauce.prefixes = conf['flavors'].match /^[^#].+$/gm sauce.names = sauce.prefixes.map (prefix) -> prefix.match(/(\w+)\./)[1] g.callbacks.push (root) -> - return if root.className is 'inline' or not thumb = $ 'img[md5]', root - span = $ '.filesize', root - suffix = thumb.src + return if root.className is 'inline' or not span = $ '.filesize', root + suffix = $('a', span).href for prefix, i in sauce.prefixes link = $.el 'a', textContent: sauce.names[i]