From 546d715270fd973064767001e6be6fb46cfa16e4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20Kr=C3=A6mmer=20Nielsen?= Date: Fri, 14 Dec 2007 13:02:53 +0100 Subject: [PATCH] Added extra ALT+4 shortcut --- content/tv2developer-quickbox.js | 4 ++++ content/tv2developer.js | 12 +++++++----- version | 2 +- webroot/index.html | 2 ++ 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/content/tv2developer-quickbox.js b/content/tv2developer-quickbox.js index d6e9dd9..c17f4aa 100644 --- a/content/tv2developer-quickbox.js +++ b/content/tv2developer-quickbox.js @@ -267,6 +267,10 @@ var TV2DeveloperQuickBox = { function() { TV2DeveloperQuickBox.setManuel(this); }, false); // init saved fields document.getElementById('testname').value = TV2Util.getPref('alternativ-initials', ''); + // auto go (ALT+4) + if (window.arguments && window.arguments[1]) { + this.goQuickbox(); + } }, goQuickbox: function() { diff --git a/content/tv2developer.js b/content/tv2developer.js index 3a89b2c..03f7acb 100755 --- a/content/tv2developer.js +++ b/content/tv2developer.js @@ -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 c006218..879be8a 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.7.6 +0.7.7 diff --git a/webroot/index.html b/webroot/index.html index c412d86..729a1a9 100644 --- a/webroot/index.html +++ b/webroot/index.html @@ -70,6 +70,8 @@ (Mac: Command+F2)
  • Genvejstast til quick link dialogen: ALT+3 (Mac: Command+F3)
  • +
  • Brug quicklink direkte fra adresselinjen - indtast en forkortet URL og tryk: ALT+4 + (Mac: Command+F4)
  • Links opfører sig som normale links, således CTRL kan bruges til at åbne i ny tab, CTRL+SHIFT i en ny tab i baggrunden, SHIFT i ny vindue, osv..
  • (Bemærk at på mac er det nødvendigt at slå accesskeys til - dette kan gøres under indstillingerne i pluginen).
  • -- 2.52.0