aboutsummaryrefslogtreecommitdiffstats
path: root/lib/main.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-09-06 12:37:42 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-09-06 12:40:25 +0200
commit49284ece28eb4c668bdcae1149b9f28af0f6396e (patch)
tree5ff3dd4980230698f1a9c566d0589d820c8bcd8d /lib/main.js
parentde625b60fba3d9a9ff7bbf9126a9f0b89968cb6b (diff)
downloadbugzilla-triage-49284ece28eb4c668bdcae1149b9f28af0f6396e.tar.gz
configData.matches array is now used as include for PageMod.
Diffstat (limited to 'lib/main.js')
-rw-r--r--lib/main.js21
1 files changed, 8 insertions, 13 deletions
diff --git a/lib/main.js b/lib/main.js
index b7875c3..6561cba 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -114,12 +114,9 @@ var contentScriptLibraries = [
self.data.url("lib/bzpage.js")
];
-var mainPMRE = new RegExp("http[s]?:\\/\\/bug(zilla|s)\\.[^\\/]*?" +
- "\\/show_bug.cgi\\?id=.*");
-
-libbz.initialize(function() {
+libbz.initialize(function(config) {
pageMod.PageMod({
- include : [ mainPMRE ],
+ include : config.configData.bugPageMatch,
contentScriptWhen : 'ready',
contentScriptFile : contentScriptLibraries,
onAttach : function onAttach(worker, msg) {
@@ -135,18 +132,16 @@ libbz.initialize(function() {
});
}
});
-});
-var skipPGRE = new RegExp("http[s]?:\\/\\/bug(zilla|s)\\.[^\\/]*?" +
- "\\/(process_bug|post_bug|attachment).cgi");
-
-pageMod.PageMod({
- include : [ skipPGRE ],
- contentScriptWhen : 'ready',
- contentScriptFile : self.data.url("lib/skip-bug.js")
+ pageMod.PageMod({
+ include : config.configData.skipMatch,
+ contentScriptWhen : 'ready',
+ contentScriptFile : self.data.url("lib/skip-bug.js")
+ });
});
+
//Allow toggling of CC event displays using a context menu entry
contextMenu.Item({
label : "Toggle CC History",