diff --git a/4chan_x.user.js b/4chan_x.user.js index b5c7ed548..155db3dff 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -530,16 +530,16 @@ init: function() { var filter, filters, key, m, regx, _i, _len; HTMLBlockquoteElement.prototype.toString = function() { - return ($.el('span', { + return ($.el('a', { innerHTML: this.innerHTML.replace(/
/g, '\n') })).textContent; }; filters = {}; for (key in config.filter) { - filters[key] = []; if (!(m = conf[key].match(/(.+)/g))) { continue; } + filters[key] = []; for (_i = 0, _len = m.length; _i < _len; _i++) { filter = m[_i]; try { diff --git a/script.coffee b/script.coffee index 3af106d67..57fd1d2c3 100644 --- a/script.coffee +++ b/script.coffee @@ -386,13 +386,13 @@ $$ = (selector, root=d.body) -> filter = init: -> HTMLBlockquoteElement.prototype.toString = -> - return ($.el 'span', innerHTML: @innerHTML.replace /
/g, '\n').textContent + return ($.el 'a', innerHTML: @innerHTML.replace /
/g, '\n').textContent filters = {} for key of config.filter - filters[key] = [] unless m = conf[key].match /(.+)/g continue + filters[key] = [] for filter in m try if (regx = eval filter).constructor is RegExp filters[key].push regx