diff options
| author | jez | 2011-01-31 10:37:29 +0800 |
|---|---|---|
| committer | jez | 2011-01-31 10:43:29 +0800 |
| commit | 3f34de770e11b41183e914a7fd7e66a4ac877730 (patch) | |
| tree | 9182f9066b1e64855568c995dd590e253e3907aa /background_page.html | |
| parent | 761ce574cf63cd5cea299e1dad917a459c572cbf (diff) | |
| parent | 35d58590b0e09e88c92ca3d49b5ba3b1ff622665 (diff) | |
| download | vimium-3f34de770e11b41183e914a7fd7e66a4ac877730.tar.bz2 | |
Merge branch 'master' into filter-hints
Conflicts:
CREDITS
commands.js
Diffstat (limited to 'background_page.html')
| -rw-r--r-- | background_page.html | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/background_page.html b/background_page.html index 106db28d..abb91677 100644 --- a/background_page.html +++ b/background_page.html @@ -196,11 +196,12 @@ var html = []; for (var i = 0; i < commandGroups[group].length; i++) { var command = commandGroups[group][i]; - bindings = (commandsToKey[command] || [""]).join(", ") - if (showUnboundCommands || commandsToKey[command]) - { - html.push("<tr><td>", escapeHtml(bindings), - "</td><td>:</td><td>", availableCommands[command].description); + bindings = (commandsToKey[command] || [""]).join(", "); + if (showUnboundCommands || commandsToKey[command]) { + html.push( + "<tr class='" + (advancedCommands.indexOf(command) >= 0 ? "advanced" : "") + "'>", + "<td>", escapeHtml(bindings), "</td>", + "<td>:</td><td>", availableCommands[command].description); if (showCommandNames) html.push("<span class='commandName'>(" + command + ")</span>"); @@ -686,6 +687,21 @@ if (localStorage["keyMappings"]) parseCustomKeyMappings(localStorage["keyMappings"]); + // In version 1.22, we changed the mapping for "d" and "u" to be scroll page down/up instead of close + // and restore tab. For existing users, we want to preserve existing behavior for them by adding some + // custom key mappings on their behalf. + if (localStorage.previousVersion == "1.21") { + var customKeyMappings = localStorage["keyMappings"] || ""; + if ((keyToCommandRegistry["d"] || {}).command == "scrollPageDown") + customKeyMappings += "\nmap d removeTab"; + if ((keyToCommandRegistry["u"] || {}).command == "scrollPageUp") + customKeyMappings += "\nmap u restoreTab"; + if (customKeyMappings != "") { + localStorage["keyMappings"] = customKeyMappings; + parseCustomKeyMappings(customKeyMappings); + } + } + populateValidFirstKeys(); populateSingleKeyCommands(); if (shouldShowUpgradeMessage()) |
