X-Git-Url: https://git.ktnx.net/?p=icedeb.git;a=blobdiff_plain;f=chrome%2Fcontent%2Ficedeb.js;h=a8db84b775cb33fc1c5a7da833f85358481d8b96;hp=236112a0e51589694d39d41135725b452adefb8f;hb=11c055c006bdb91316309563251d91981439cf33;hpb=da549daa0245fd1e8f4fc55ab22583780d218253 diff --git a/chrome/content/icedeb.js b/chrome/content/icedeb.js index 236112a..a8db84b 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; @@ -46,7 +50,7 @@ IceDeb = { lookup_bts: function(in_new) { var bug = IceDeb.trim_keyword(IceDeb.getClipboardText()); if (!bug) return null; - var uri="http://bugs.debian.org/" + bug; + var uri="https://bugs.debian.org/" + bug; if (in_new) { var b = getBrowser(); @@ -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(); @@ -74,7 +78,7 @@ IceDeb = { lookup_deb: function(in_new) { var pkg = IceDeb.trim_keyword(IceDeb.getClipboardText()); if (!pkg) return null; - var uri="http://packages.debian.org/" + pkg; + var uri="https://packages.debian.org/" + pkg; if (in_new) { var b = getBrowser(); @@ -88,7 +92,7 @@ IceDeb = { lookup_ml: function(in_new) { var msg_id = IceDeb.trim_keyword(IceDeb.getClipboardText()); if (!msg_id) msg_id = ''; - var uri="http://lists.debian.org/msgid-search/" + msg_id; + var uri="https://lists.debian.org/msgid-search/" + msg_id; if (in_new) { var b = getBrowser(); @@ -101,7 +105,7 @@ IceDeb = { }, lookup_ddpo: function(in_new) { var keyword = IceDeb.trim_keyword(IceDeb.getClipboardText()); - var uri="http://qa.debian.org/developer.php"; + var uri="https://qa.debian.org/developer.php"; if (keyword) uri += "?login=" + keyword; @@ -114,6 +118,36 @@ IceDeb = { 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="https://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 ) @@ -144,6 +178,18 @@ IceDeb = { 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); } }