From f22ea17429a575080835f0f48696708715680389 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sun, 29 Apr 2012 14:26:46 +0200 Subject: [PATCH] Fix Sauces. NBSPs seem to be necessary. --- 4chan_x.user.js | 6 +++--- script.coffee | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index e9a4f794e..29011bdd6 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2762,7 +2762,7 @@ case '$2': return "' + img.href + '"; case '$3': - return "' + img.firstChild.getAttribute('md5').replace(/\=*$/, '') + '"; + return "' + img.firstChild.dataset.md5.replace(/\=*$/, '') + '"; case '$4': return g.BOARD; } @@ -2790,9 +2790,9 @@ _ref = Sauce.links; for (_i = 0, _len = _ref.length; _i < _len; _i++) { link = _ref[_i]; - nodes.push($.tn(' '), link(img)); + nodes.push($.tn('\u00A0'), link(img)); } - return $.add(post.filesize, nodes); + return $.add(post.fileinfo, nodes); } }; diff --git a/script.coffee b/script.coffee index a3f25dcc2..d3e157bb9 100644 --- a/script.coffee +++ b/script.coffee @@ -2193,7 +2193,7 @@ Sauce = when '$2' "' + img.href + '" when '$3' - "' + img.firstChild.getAttribute('md5').replace(/\=*$/, '') + '" + "' + img.firstChild.dataset.md5.replace(/\=*$/, '') + '" when '$4' g.BOARD href = Function 'img', "return '#{href}'" @@ -2211,8 +2211,9 @@ Sauce = img = img.parentNode nodes = [] for link in Sauce.links - nodes.push $.tn(' '), link img - $.add post.filesize, nodes + # \u00A0 is nbsp + nodes.push $.tn('\u00A0'), link img + $.add post.fileinfo, nodes RevealSpoilers = init: ->