diff --git a/4chan_x.user.js b/4chan_x.user.js index 8399c3203..e53dd7c3f 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2772,7 +2772,7 @@ createSauceLink: function(link) { var domain, el, href; domain = link.match(/(\w+)\.\w+\//)[1]; - href = link.replace(/(\d)/g, function(parameter) { + href = link.replace(/(\$\d)/g, function(parameter) { switch (parameter) { case '$1': return "http://thumbs.4chan.org' + img.pathname.replace(/src(\\/\\d+).+$/, 'thumb$1s.jpg') + '"; diff --git a/script.coffee b/script.coffee index 2e0e5f30c..4425cf64d 100644 --- a/script.coffee +++ b/script.coffee @@ -2349,7 +2349,7 @@ Sauce = createSauceLink: (link) -> domain = link.match(/(\w+)\.\w+\//)[1] - href = link.replace /(\d)/g, (parameter) -> + href = link.replace /(\$\d)/g, (parameter) -> switch parameter when '$1' "http://thumbs.4chan.org' + img.pathname.replace(/src(\\/\\d+).+$/, 'thumb$1s.jpg') + '"