return text;
}
-function lookup_bts() {
+function lookup_bts(in_new) {
var bug = getClipboardText();
- loadURI("http://bugs.debian.org/" + bug);
+ if (!bug) return null;
+ bug = bug.replace(/^#/, '');
+ var uri="http://bugs.debian.org/" + bug;
+
+ if (in_new) {
+ var b = getBrowser();
+ var new_tab = b.addTab(uri);
+ b.selectedTab = new_tab;
+ }
+ else {
+ loadURI(uri);
+ }
}
Debian = {
btsButton: function (e) {
- lookup_bts();
+ if ( e.button == 0 )
+ lookup_bts(false)
+ else if ( e.button == 1 )
+ lookup_bts(true);
}
}