aboutsummaryrefslogtreecommitdiffstats
path: root/skip-process-bug.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2009-11-15 23:38:56 +0100
committerMatěj Cepl <mcepl@redhat.com>2009-11-15 23:38:56 +0100
commitf6473374cf5984ebdb3e96edc1e176ae65bc2eac (patch)
tree851bcae1bcc7309d58b48c9d7bc1b7988a637e6f /skip-process-bug.js
parent56c6054e53f51abe940561b49280feb569f8f846 (diff)
downloadbugzilla-triage-f6473374cf5984ebdb3e96edc1e176ae65bc2eac.tar.gz
We want to follow jetpack directory. Filtering out will be done before
merge to master.
Diffstat (limited to 'skip-process-bug.js')
-rw-r--r--skip-process-bug.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/skip-process-bug.js b/skip-process-bug.js
new file mode 100644
index 0000000..3972893
--- /dev/null
+++ b/skip-process-bug.js
@@ -0,0 +1,16 @@
+jetpack.tabs.onReady(function(doc){
+ var root = 'https://bugzilla.mozilla.org/',
+ pages = ['attachment', 'post_bug', 'process_bug'],
+ paths = pages.map(function(p) root + p + '.cgi'),
+ collision = 'Mid-air collision!';
+ if (paths.some(function(p) doc.location == p) && doc.title != collision) {
+ var $doc = $(doc),
+ mail = $doc.find('#bugzilla-body > dl').text(),
+ bug = $($doc.find('.bz_alias_short_desc_container > a'));
+ /* Bail if we sense a disturbance. */
+ if (bug.size() != 0) {
+ jetpack.notifications.show({title: 'Mail sent for ' + bug.text(), body: mail});
+ doc.location = root + bug.attr('href');
+ }
+ }
+});