X-Git-Url: https://git.ktnx.net/?a=blobdiff_plain;ds=sidebyside;f=chrome%2Fcontent%2Ficedeb.js;h=262f09d8bbfcde262b52d71b2316d9ba160c9263;hb=f7916fc170751450d5c603471a7ebf7f41f8c600;hp=742ca822dafc54c2a1631d55472f31e55995218b;hpb=233b8f5208d72f460fcb8637c27d8109b39dd940;p=icedeb.git diff --git a/chrome/content/icedeb.js b/chrome/content/icedeb.js index 742ca82..262f09d 100644 --- a/chrome/content/icedeb.js +++ b/chrome/content/icedeb.js @@ -8,6 +8,9 @@ IceDeb = { .createInstance(Components.interfaces.nsITransferable); if (!trans) return null; + if (typeof(trans.init) === 'function') + trans.init(null); + trans.addDataFlavor("text/unicode"); clip.getData(trans, clip.supportsSelectionClipboard() @@ -39,6 +42,7 @@ IceDeb = { word = word.replace(/^[^a-zA-Z0-9]+/, ''); word = word.replace(/[^a-zA-Z0-9]+$/, ''); + word = word.replace(/^Bug#/i, ''); } while ( oldword != word ); return word; @@ -60,7 +64,7 @@ IceDeb = { lookup_pts: function(in_new) { var pkg = IceDeb.trim_keyword(IceDeb.getClipboardText()); if (!pkg) return null; - var uri="http://packages.qa.debian.org/" + pkg; + var uri="https://tracker.debian.org/" + pkg; if (in_new) { var b = getBrowser(); @@ -129,6 +133,21 @@ IceDeb = { loadURI(uri); } }, + lookup_security: function(in_new) { + var keyword = IceDeb.trim_keyword(IceDeb.getClipboardText()); + var uri="http://security-tracker.debian.org/"; + + if (keyword) uri += "tracker/" + keyword; + + if (in_new) { + var b = getBrowser(); + var new_tab = b.addTab(uri); + b.selectedTab = new_tab; + } + else { + loadURI(uri); + } + }, btsButton: function (e) { if ( e.button == 0 ) @@ -165,6 +184,12 @@ IceDeb = { IceDeb.lookup_buildd(false) else if ( e.button == 1 ) IceDeb.lookup_buildd(true); + }, + securityButton: function (e) { + if ( e.button == 0 ) + IceDeb.lookup_security(false) + else if ( e.button == 1 ) + IceDeb.lookup_security(true); } }