-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBugzilla_My_Bugs_Linker.user.js
More file actions
29 lines (23 loc) · 1.29 KB
/
Bugzilla_My_Bugs_Linker.user.js
File metadata and controls
29 lines (23 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// ==UserScript==
// @name My Bugs Linker
// @namespace http://csutherl.github.io/
// @version 0.1
// @description Inject a few links for specific bug searches
// @author csutherl
// @match https://bugzilla.redhat.com/*
// @grant none
// ==/UserScript==
/* jshint -W097 */
'use strict';
var mybugs = $('a').filter(function(index) { return $(this).text() === "My Bugs"; });
// put your email here...ensure the @ is encoded %40 :)
var email = "test%40example.com"
var mybugs_filter = "bug_status=NEW&bug_status=VERIFIED&bug_status=ASSIGNED&bug_status=MODIFIED&bug_status=ON_DEV&bug_status=ON_QA&bug_status=RELEASE_PENDING&" +
"amp;bug_status=POST&email1=" + email + "&emailtype1=exact&emailassigned_to1=1&emailreporter1=1&emailcc1=1";
var rhel6_filter = mybugs_filter + "&product=Red%20Hat%20Enterprise%20Linux%206&component=tomcat6"
var rhel7_filter = mybugs_filter + "&product=Red%20Hat%20Enterprise%20Linux%207&component=tomcat"
var sep_span = '<span class="separator"> | </span>';
var rhel6_link = sep_span + '<a href="buglist.cgi?' + rhel6_filter + '">My RHEL 6 Bugs</a>';
var rhel7_link = sep_span + '<a href="buglist.cgi?' + rhel7_filter + '">My RHEL 7 Bugs</a>';
$(rhel7_link).insertAfter(mybugs);
$(rhel6_link).insertAfter(mybugs);