From b83c4cebf6d741d3ae2a62ab517da27a3dc0ca78 Mon Sep 17 00:00:00 2001 From: James Campos Date: Sun, 9 Oct 2011 16:18:12 -0700 Subject: [PATCH] tweaks --- 4chan_x.user.js | 4 ++-- script.coffee | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 2fde6b1af..2aa249c7d 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2175,8 +2175,8 @@ sauce = { init: function() { sauce.prefixes = conf['flavors'].match(/^[^#].+$/gm); - sauce.names = sauce.prefixes.map(function(s) { - return s.match(/\w+(?=\.)/)[0]; + sauce.names = sauce.prefixes.map(function(prefix) { + return prefix.match(/(\w+)\./)[1]; }); return g.callbacks.push(function(root) { var i, link, prefix, span, suffix, _len, _ref, _results; diff --git a/script.coffee b/script.coffee index 4432f81a9..c54ff7fcc 100644 --- a/script.coffee +++ b/script.coffee @@ -1647,7 +1647,7 @@ anonymize = sauce = init: -> sauce.prefixes = conf['flavors'].match /^[^#].+$/gm - sauce.names = sauce.prefixes.map (s) -> s.match(/\w+(?=\.)/)[0] + sauce.names = sauce.prefixes.map (prefix) -> prefix.match(/(\w+)\./)[1] g.callbacks.push (root) -> return if root.className is 'inline' or not span = $ '.filesize', root suffix = $('a', span).href