X-Git-Url: https://git.ktnx.net/?p=icedeb.git;a=blobdiff_plain;f=chrome%2Ficedeb.js;h=df6363f3cfab8cfa1124fd07411783f32eb2349e;hp=823c2afdb6f48973b1cadbe4dd576d17a49216e9;hb=c3fadf7aca3227a9287629b8eecd566cb46cacbc;hpb=101b6fa7de96b90a611e43467e07739fc52fbd3b diff --git a/chrome/icedeb.js b/chrome/icedeb.js index 823c2af..df6363f 100644 --- a/chrome/icedeb.js +++ b/chrome/icedeb.js @@ -42,12 +42,54 @@ 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); + } +} + +function lookup_deb(in_new) { + var pkg = getClipboardText(); + if (!pkg) return null; + var uri="http://packages.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); + }, + debButton: function (e) { + if ( e.button == 0 ) + lookup_deb(false) + else if ( e.button == 1 ) + lookup_deb(true); } }