]> git.ktnx.net Git - icedeb.git/blobdiff - chrome/icedeb.js
add new PTS lookup button
[icedeb.git] / chrome / icedeb.js
index 823c2afdb6f48973b1cadbe4dd576d17a49216e9..66159cff2e222a782dd54c4d57dcdf0bf6799adb 100644 (file)
@@ -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);
     }
 }