From 2aabaeb3efb7419f400f639ab75a98a48bf1fd81 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Thu, 29 Jul 2010 16:26:53 +0200 Subject: Regexps for matching URLs is configuration and should be in JSON, not statically included in data/ subdirectory. (cherry picked from commit 0728e2ad4809619cd3ba5215252a52df85697940) --- lib/main.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/main.js b/lib/main.js index 43fa87d..a8bae4c 100644 --- a/lib/main.js +++ b/lib/main.js @@ -24,11 +24,6 @@ var JSONURLDefault = "https://fedorahosted.org/released"+ "/bugzilla-triage-scripts/Config_data.json"; var config = {}; -(function (){ - var matchesAll = JSON.parse(selfMod.data.load("matches.json")); - config.matches = matchesAll.matches; - config.skipMatches = matchesAll.skipMatches; -})(); function isOurPage(window, matchingURLs) { var url = window.location.href; @@ -105,6 +100,11 @@ function initialize(callback) { config.logger = new logConstructor(myStorage.logs, JSON.parse(selfMod.data.load("bugzillalabelAbbreviations.json"))); + config.matches = config.gJSONData.configData.matches; + config.skipMatches = config.matches.map(function(x) { + return x.replace("show_bug.cgi.*","(process|post)_bug.cgi"); + }); + callback(config); } } -- cgit