aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-07-29 16:26:53 +0200
committerMatěj Cepl <mcepl@redhat.com>2010-07-29 16:29:19 +0200
commit2aabaeb3efb7419f400f639ab75a98a48bf1fd81 (patch)
tree2bf16314de2495d9ab3252d8d44f0269694bfe2f /lib
parentfe64972133d1fdc55515b5473638dace774ea69e (diff)
downloadbugzilla-triage-2aabaeb3efb7419f400f639ab75a98a48bf1fd81.tar.gz
Regexps for matching URLs is configuration and should be in JSON, not
statically included in data/ subdirectory. (cherry picked from commit 0728e2ad4809619cd3ba5215252a52df85697940)
Diffstat (limited to 'lib')
-rw-r--r--lib/main.js10
1 files changed, 5 insertions, 5 deletions
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);
}
}