X-Git-Url: https://git.ktnx.net/?p=icedeb.git;a=blobdiff_plain;f=chrome%2Fcontent%2Ficedeb.js;h=262f09d8bbfcde262b52d71b2316d9ba160c9263;hp=9c393462bca055985bcc77c96c320bd50705dafb;hb=f7916fc170751450d5c603471a7ebf7f41f8c600;hpb=967f267a7ad4d2d09057718f32102855184d7f7e diff --git a/chrome/content/icedeb.js b/chrome/content/icedeb.js index 9c39346..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(); @@ -99,6 +103,51 @@ IceDeb = { loadURI(uri); } }, + lookup_ddpo: function(in_new) { + var keyword = IceDeb.trim_keyword(IceDeb.getClipboardText()); + var uri="http://qa.debian.org/developer.php"; + + if (keyword) uri += "?login=" + keyword; + + if (in_new) { + var b = getBrowser(); + var new_tab = b.addTab(uri); + b.selectedTab = new_tab; + } + else { + loadURI(uri); + } + }, + lookup_buildd: function(in_new) { + var keyword = IceDeb.trim_keyword(IceDeb.getClipboardText()); + var uri="https://buildd.debian.org/"; + + if (keyword) uri += keyword; + + if (in_new) { + var b = getBrowser(); + var new_tab = b.addTab(uri); + b.selectedTab = new_tab; + } + else { + 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 ) @@ -123,6 +172,24 @@ IceDeb = { IceDeb.lookup_ml(false) else if ( e.button == 1 ) IceDeb.lookup_ml(true); + }, + ddpoButton: function (e) { + if ( e.button == 0 ) + IceDeb.lookup_ddpo(false) + else if ( e.button == 1 ) + IceDeb.lookup_ddpo(true); + }, + builddButton: function (e) { + if ( e.button == 0 ) + 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); } }