X-Git-Url: https://git.ktnx.net/?p=icedeb.git;a=blobdiff_plain;f=chrome%2Ficedeb.js;h=66159cff2e222a782dd54c4d57dcdf0bf6799adb;hp=823c2afdb6f48973b1cadbe4dd576d17a49216e9;hb=2c8bc47dd316733f9b14462665d909247b2f08b4;hpb=6e5d17884fb20ba0e85822f0d62acd300362590b diff --git a/chrome/icedeb.js b/chrome/icedeb.js index 823c2af..66159cf 100644 --- a/chrome/icedeb.js +++ b/chrome/icedeb.js @@ -42,12 +42,33 @@ function lookup_bts(in_new) { } } +function lookup_pts(in_new) { + var pkg = getClipboardText(); + if (!pkg) return null; + var uri="http://packages.qa.debian.org/" + pkg; + + if (in_new) { + var b = getBrowser(); + var new_tab = b.addTab(uri); + b.selectedTab = new_tab; + } + else { + loadURI(uri); + } +} + Debian = { btsButton: function (e) { if ( e.button == 0 ) lookup_bts(false) else if ( e.button == 1 ) lookup_bts(true); + }, + ptsButton: function (e) { + if ( e.button == 0 ) + lookup_pts(false) + else if ( e.button == 1 ) + lookup_pts(true); } }