Added extra ALT+4 shortcut
authorKristian Kræmmer Nielsen <jkkn@jkkn.dk>
Fri, 14 Dec 2007 12:02:53 +0000 (13:02 +0100)
committerKristian Kræmmer Nielsen <jkkn@jkkn.dk>
Fri, 14 Dec 2007 12:02:53 +0000 (13:02 +0100)
content/tv2developer-quickbox.js
content/tv2developer.js
version
webroot/index.html

index d6e9dd90856171ff3fa58df17eb6e6cc657d0442..c17f4aa911d109c71ff3a1964f9d00147fd52cb4 100644 (file)
@@ -267,6 +267,10 @@ var TV2DeveloperQuickBox = {
                function() { TV2DeveloperQuickBox.setManuel(this); }, false);\r
            // init saved fields\r
                document.getElementById('testname').value = TV2Util.getPref('alternativ-initials', '');\r
+        // auto go (ALT+4)\r
+           if (window.arguments && window.arguments[1]) {\r
+               this.goQuickbox();\r
+           }\r
        },\r
        \r
        goQuickbox: function() {\r
index 3a89b2ce18c6687cfe8aa9f859f91c6e4e50d662..03f7acb52f486a9a8eb91982c07b45bcfacb5684 100755 (executable)
@@ -52,9 +52,10 @@ var TV2Developer = {
         if (chromeAccess & 8) altKey.push('meta');
         if (altKey.length > 0) {
             altKey = altKey.join(',');
-            this._addShortcut(shortcuts, 'tv2-key-open-1',  altKey, '1', 'VK_F1', 'TV2Developer.handleKeyShortcut(event)');
-            this._addShortcut(shortcuts, 'tv2-key-repeat-1', altKey, '2', 'VK_F2', 'TV2Developer.handleButton(event)');
-            this._addShortcut(shortcuts, 'tv2-key-quick-1', altKey, '3', 'VK_F3', 'TV2Developer.openQuickbox(event)');
+            this._addShortcut(shortcuts, 'tv2-key-open',  altKey, '1', 'VK_F1', 'TV2Developer.handleKeyShortcut(event)');
+            this._addShortcut(shortcuts, 'tv2-key-repeat', altKey, '2', 'VK_F2', 'TV2Developer.handleButton(event)');
+            this._addShortcut(shortcuts, 'tv2-key-quick', altKey, '3', 'VK_F3', 'TV2Developer.openQuickbox(event)');
+            this._addShortcut(shortcuts, 'tv2-key-quick-go', altKey, '4', 'VK_F4', 'TV2Developer.openQuickbox(event, true)');
         }
 
         // first run, add icon
@@ -545,13 +546,14 @@ var TV2Developer = {
         } catch(ex) {}
     },
 
-       openQuickbox: function(event) {
+       openQuickbox: function(event, autogo) {
       var startUrl = '';
       var urlbar = document.getElementById('urlbar');
+      if (typeof(autogo)=='undefined') autogo = false;
       if (urlbar) {
           startUrl = urlbar.value;
       }
-           window.openDialog('chrome://tv2developer/content/quickbox.xul','tv2quickbox','modal,centerscreen,chrome,resizable=no,title=no', startUrl);
+           window.openDialog('chrome://tv2developer/content/quickbox.xul','tv2quickbox','modal,centerscreen,chrome,resizable=no,title=no', startUrl, autogo);
        },
        
        /* Options */
diff --git a/version b/version
index c006218557f7c7b108cc1fcb114fcd0906fbdb04..879be8a98fc7a080771e966eb405fca1b40108de 100644 (file)
--- a/version
+++ b/version
@@ -1 +1 @@
-0.7.6
+0.7.7
index c412d869cff2f15ce115efa95a304bc1b3c79993..729a1a9c7c72225230f29115b7d00e84eaf48795 100644 (file)
@@ -70,6 +70,8 @@
                 (Mac: <code>Command+F2</code>)</li>
                 <li>Genvejstast til quick link dialogen: <code>ALT+3</code>
                 (Mac: <code>Command+F3</code>)</li>
+                <li>Brug quicklink direkte fra adresselinjen - indtast en forkortet URL og tryk: <code>ALT+4</code>
+                (Mac: <code>Command+F4</code>)</li>
                 <li>Links opfører sig som normale links, således <code>CTRL</code> kan bruges til at åbne i ny tab, <code>CTRL+SHIFT</code> i en ny tab i baggrunden, <code>SHIFT</code> i ny vindue, osv..</li>
                 <li>(Bemærk at på mac er det nødvendigt at slå accesskeys til - dette kan gøres under indstillingerne i pluginen).</li>
             </ul>