From 49284ece28eb4c668bdcae1149b9f28af0f6396e Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Tue, 6 Sep 2011 12:37:42 +0200 Subject: configData.matches array is now used as include for PageMod. --- lib/main.js | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'lib/main.js') 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", -- cgit