From e64ea74bbec093d589759651b1974c0a277fc738 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sun, 9 Oct 2011 03:25:55 +0200 Subject: [PATCH] Use * instead of {0,} --- 4chan_x.user.js | 4 ++-- script.coffee | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 44e06430b..1ec6c3b94 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -530,13 +530,13 @@ init: function() { var f, filter, key, m, _i, _len; for (key in config.filter) { - if (!(m = conf[key].match(/^\/.+\/\w{0,}$/gm))) { + if (!(m = conf[key].match(/^\/.+\/\w*$/gm))) { continue; } this.regexps[key] = []; for (_i = 0, _len = m.length; _i < _len; _i++) { filter = m[_i]; - f = filter.match(/^\/(.+)\/(\w{0,})$/); + f = filter.match(/^\/(.+)\/(\w*)$/); this.regexps[key].push(RegExp(f[1], f[2])); } if (this.regexps[key].length) { diff --git a/script.coffee b/script.coffee index 7f13f3d2b..34b66d199 100644 --- a/script.coffee +++ b/script.coffee @@ -386,11 +386,11 @@ filter = callbacks: [] init: -> for key of config.filter - unless m = conf[key].match /^\/.+\/\w{0,}$/gm + unless m = conf[key].match /^\/.+\/\w*$/gm continue @regexps[key] = [] for filter in m - f = filter.match /^\/(.+)\/(\w{0,})$/ + f = filter.match /^\/(.+)\/(\w*)$/ @regexps[key].push RegExp f[1], f[2] #only execute what's filterable @callbacks.push @[key] if @regexps[key].length