aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorilya2010-04-18 19:41:23 -0700
committerilya2010-04-18 19:41:23 -0700
commit962803b79128653fe6c15592943c60e6701b9c63 (patch)
treefbf5893cbe0783aab8547db91ee36787864075cb
parent854d83fa974f17fe0f8066b65391ec770534a07a (diff)
parent42233dbd79b9f8fb3b540c29393f32dc79a373d1 (diff)
downloadvimium-962803b79128653fe6c15592943c60e6701b9c63.tar.bz2
Merge branch 'master' of git://github.com/philc/vimium
-rw-r--r--CREDITS2
-rw-r--r--background_page.html14
-rw-r--r--linkHints.js4
-rw-r--r--vimiumFrontend.js8
4 files changed, 14 insertions, 14 deletions
diff --git a/CREDITS b/CREDITS
index 005a0d27..ad10fc2a 100644
--- a/CREDITS
+++ b/CREDITS
@@ -8,8 +8,10 @@ Contributors:
Bill Mill (github: llimllib)
drizzd
int3
+ Johannes Emerich (github: knuton)
lack
markstos
rodimius
+ tsigo
Feel free to add real names in addition to GitHub usernames.
diff --git a/background_page.html b/background_page.html
index 0c8b2d20..4c328a20 100644
--- a/background_page.html
+++ b/background_page.html
@@ -327,7 +327,6 @@
// We should update all the tabs in the old window and the new window.
if (openTabs[tabId]) {
updatePositionsAndWindowsForAllTabsInWindow(openTabs[tabId].windowId);
- updateTabQueueIndices(openTabs[tabId].windowId, openTabs[tabId].positionIndex);
}
updatePositionsAndWindowsForAllTabsInWindow(attachedInfo.newWindowId);
});
@@ -336,14 +335,6 @@
updatePositionsAndWindowsForAllTabsInWindow(moveInfo.windowId);
});
- function updateTabQueueIndices(windowId, positionIndex) {
- for (var i in tabQueue[windowId]) {
- if (tabQueue[windowId][i].positionIndex > positionIndex) {
- tabQueue[windowId][i].positionIndex--;
- }
- }
- }
-
chrome.tabs.onRemoved.addListener(function(tabId) {
var openTabInfo = openTabs[tabId];
updatePositionsAndWindowsForAllTabsInWindow(openTabInfo.windowId);
@@ -352,7 +343,10 @@
// Pretend they never existed and adjust tab indices accordingly.
// Could possibly expand this into a blacklist in the future
if (/^chrome[^:]*:\/\/.*/.test(openTabInfo.url)) {
- updateTabQueueIndices(openTabInfo.windowId, openTabInfo.positionIndex);
+ for (var i in tabQueue[openTabInfo.windowId]) {
+ if (tabQueue[openTabInfo.windowId][i].positionIndex > openTabInfo.positionIndex)
+ tabQueue[openTabInfo.windowId][i].positionIndex--;
+ }
return;
}
diff --git a/linkHints.js b/linkHints.js
index 0b70acc1..579e8851 100644
--- a/linkHints.js
+++ b/linkHints.js
@@ -128,12 +128,12 @@ function getElementFromPoint(x, y) {
}
function onKeyDownInLinkHintsMode(event) {
- var keyChar = String.fromCharCode(event.keyCode).toLowerCase();
+ var keyChar = getKeyChar(event);
if (!keyChar)
return;
// TODO(philc): Ignore keys that have modifiers.
- if (event.keyCode == keyCodes.ESC) {
+ if (isEscape(event)) {
deactivateLinkHintsMode();
} else if (event.keyCode == keyCodes.backspace || event.keyCode == keyCodes.deleteKey) {
if (hintKeystrokeQueue.length == 0) {
diff --git a/vimiumFrontend.js b/vimiumFrontend.js
index 8a9d91ee..a9c8024c 100644
--- a/vimiumFrontend.js
+++ b/vimiumFrontend.js
@@ -63,7 +63,10 @@ function initializePreDomReady() {
else if (request.name == "showUpgradeNotification" && isEnabledForUrl)
HUD.showUpgradeNotification(request.version);
else if (request.name == "showHelpDialog")
- showHelpDialog(request.dialogHtml);
+ if (isShowingHelpDialog)
+ hideHelpDialog();
+ else
+ showHelpDialog(request.dialogHtml);
else if (request.name == "refreshCompletionKeys")
refreshCompletionKeys(request.completionKeys);
sendResponse({}); // Free up the resources used by this open connection.
@@ -467,11 +470,12 @@ function showHelpDialog(html) {
Math.max((window.innerHeight - dialog.clientHeight * zoomFactor) / 2.0, 20) / zoomFactor + "px";
}
-function hideHelpDialog() {
+function hideHelpDialog(clickEvent) {
isShowingHelpDialog = false;
var helpDialog = document.getElementById("vimiumHelpDialogContainer");
if (helpDialog)
helpDialog.parentNode.removeChild(helpDialog);
+ clickEvent.preventDefault();
}
/*