aboutsummaryrefslogtreecommitdiffstats
path: root/skip-process-bug.js
diff options
context:
space:
mode:
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');
+ }
+ }
+});