aboutsummaryrefslogtreecommitdiffstats
path: root/background_page.html
diff options
context:
space:
mode:
authorPhil Crosby2011-02-09 23:06:41 -0800
committerPhil Crosby2011-02-09 23:06:41 -0800
commita036d2dac281b2528c2087b08839e118e3f449ae (patch)
tree68fcd1b415fd14d21505bca3ce3d9e9a14d837e8 /background_page.html
parent1edb16a47eb8a35fc3ea7991bfdfc8434d1d3bff (diff)
downloadvimium-a036d2dac281b2528c2087b08839e118e3f449ae.tar.bz2
Preserve the "show advanced commands" setting after you close the vimium help dialog.
Diffstat (limited to 'background_page.html')
-rw-r--r--background_page.html9
1 files changed, 8 insertions, 1 deletions
diff --git a/background_page.html b/background_page.html
index 77150244..ee12a77d 100644
--- a/background_page.html
+++ b/background_page.html
@@ -79,7 +79,8 @@
upgradeNotificationClosed: upgradeNotificationClosed,
updateScrollPosition: handleUpdateScrollPosition,
copyToClipboard: copyToClipboard,
- isEnabledForUrl: isEnabledForUrl
+ isEnabledForUrl: isEnabledForUrl,
+ saveHelpDialogSettings: saveHelpDialogSettings
};
// Event handlers
@@ -151,6 +152,10 @@
return { isEnabledForUrl: isEnabled };
}
+ function saveHelpDialogSettings(request) {
+ localStorage["helpDialog_showAdvancedCommands"] = request.showAdvancedCommands;
+ }
+
/*
* Returns the previously saved zoom level for the current tab, or the default zoom level
*/
@@ -186,6 +191,8 @@
showUnboundCommands, showCommandNames));
dialogHtml = dialogHtml.replace("{{version}}", currentVersion);
dialogHtml = dialogHtml.replace("{{title}}", customTitle || "Help");
+ dialogHtml = dialogHtml.replace("{{showAdvancedCommands}}",
+ localStorage["helpDialog_showAdvancedCommands"] == "true");
return dialogHtml;
}