diff options
Diffstat (limited to 'lib/main.js')
-rw-r--r-- | lib/main.js | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/lib/main.js b/lib/main.js index 1d97e81..3ca736e 100644 --- a/lib/main.js +++ b/lib/main.js @@ -123,15 +123,12 @@ var contentScriptLibraries = [ self.data.url("lib/bzpage.js") ]; +var mainPMRE = new RegExp("http[s]?:\\/\\/bug(zilla|s)\\.[^\\/]*?" + + "\\/show_bug.cgi\\?id=.*"); libbz.initialize(libbz.config, function() { pageMod.PageMod({ - include : [ - "https://bugzilla.redhat.com/show_bug.cgi?id=*", - "https://bugzilla.mozilla.org/show_bug.cgi?id=*", - "https://bugs.freedesktop.org/show_bug.cgi?id=*", - "https://bugzilla.gnome.org/show_bug.cgi?id=*" - ], + include : [ mainPMRE ], contentScriptWhen : 'ready', contentScriptFile : contentScriptLibraries, onAttach : function onAttach(worker, msg) { @@ -149,22 +146,11 @@ libbz.initialize(libbz.config, function() { }); }); +var skipPGRE = new RegExp("http[s]?:\\/\\/bug(zilla|s)\\.[^\\/]*?" + + "\\/(process_bug|post_bug|attachment).cgi"); pageMod.PageMod({ - include : [ - "https://bugzilla.redhat.com/process_bug.cgi", - "https://bugzilla.redhat.com/post_bug.cgi", - "https://bugzilla.redhat.com/attachment.cgi", - "https://bugs.freedesktop.org/process_bug.cgi", - "https://bugs.freedesktop.org/post_bug.cgi", - "https://bugs.freedesktop.org/attachment.cgi", - "https://bugzilla.mozilla.org/process_bug.cgi", - "https://bugzilla.mozilla.org/post_bug.cgi", - "https://bugzilla.mozilla.org/attachment.cgi", - "https://bugzilla.gnome.org/process_bug.cgi", - "https://bugzilla.gnome.org/post_bug.cgi", - "https://bugzilla.gnome.org/attachment.cgi" - ], + include : [ skipPGRE ], contentScriptWhen : 'ready', contentScriptFile : self.data.url("lib/skip-bug.js") }); |