aboutsummaryrefslogtreecommitdiffstats
path: root/settings.html
diff options
context:
space:
mode:
authorPhil Crosby2009-11-28 16:48:42 -0800
committerPhil Crosby2009-11-28 16:48:42 -0800
commitb059a71bbf090e779f690cf53af35493f1e25b3e (patch)
tree8549c6a1400525be3384d7deeb170e902f86e428 /settings.html
parentee2e9c686d7715286a426feb199b6ccb33b4dae9 (diff)
downloadvimium-b059a71bbf090e779f690cf53af35493f1e25b3e.tar.bz2
Add defaultZoomLevel to the settings page
Diffstat (limited to 'settings.html')
-rw-r--r--settings.html17
1 files changed, 11 insertions, 6 deletions
diff --git a/settings.html b/settings.html
index 8e89de92..f0cb87f5 100644
--- a/settings.html
+++ b/settings.html
@@ -6,10 +6,13 @@
<script type="text/javascript">
// Saves options to localStorage.
- function save_options() {
+ function saveOptions() {
var scrollStepSize = document.getElementById("scrollStepSize").value;
localStorage["scrollStepSize"] = scrollStepSize;
+ var defaultZoomLevel = document.getElementById("defaultZoomLevel").value;
+ localStorage["defaultZoomLevel"] = defaultZoomLevel;
+
// Update status to let user know options were saved.
var status = document.getElementById("status");
status.innerHTML = "Settings Saved.";
@@ -17,21 +20,23 @@
}
// Restores select box state to saved value from localStorage.
- function restore_options() {
+ function restoreOptions() {
// TODO(ilya): Create a single option list with defaults somewhere to share across various scripts.
- var scrollStepSize = localStorage["scrollStepSize"];
- if (!scrollStepSize) { scrollStepSize = 60; }
+ var scrollStepSize = localStorage["scrollStepSize"] || 60;
+ var defaultZoomLvel = localStorage["defaultZoomLevel"] || 100;
document.getElementById("scrollStepSize").value = scrollStepSize;
+ document.getElementById("defaultZoomLevel").value = defaultZoomLvel
}
</script>
- <body onload="restore_options()">
+ <body onload="restoreOptions()">
<h1>Vimium - Settings</h1>
Scroll Step Size: <input id="scrollStepSize" type="text"> px (default: 60)
<br>
+ Scroll Step Size: <input id="defaultZoomLevel" type="text" value="100"> % (default: 100)
- <button onclick="save_options()">Save Settings</button>
+ <button onclick="saveOptions()">Save Settings</button>
<div id="status"></div>
</body>
</html>