Index: chrome/browser/resources/access_chromevox/chromevox/background/options.html |
=================================================================== |
--- chrome/browser/resources/access_chromevox/chromevox/background/options.html (revision 0) |
+++ chrome/browser/resources/access_chromevox/chromevox/background/options.html (revision 0) |
@@ -0,0 +1,43 @@ |
+<head> |
+<title>ChromeVox Options</title> |
+<script type="text/javascript"> |
+ |
+ |
+// Saves options to localStorage. |
+function save_options() { |
+ localStorage["test"] = document.getElementById("test").value; |
+} |
+ |
+// Restores default options |
+function restore_defaults() { |
+ document.getElementById("test").value = "foo"; |
+} |
+ |
+// Restores select box state to saved value from localStorage. |
+function restore_options() { |
+ if (!localStorage["test"]) { |
+ restore_defaults(); |
+ save_options(); |
+ } |
+ |
+ document.getElementById("test").value = localStorage["test"]; |
+} |
+ |
+</script> |
+</head> |
+<html> |
+<body onload="restore_options()"> |
+ |
+<h2 id="title"></h2> |
+<div id="options"> |
+ |
+<label for="test" id="testLabel">Test</label> |
+<input id="test" type="text"><br /> |
+<br /> |
+ |
+<button id="saveButton" onclick="save_options()">Save</button> |
+<button id="restoreButton" onclick="restore_defaults()">Restore</button> |
+</div> |
+ |
+</body> |
+</html> |
Property changes on: chrome/browser/resources/access_chromevox/chromevox/background/options.html |
___________________________________________________________________ |
Added: svn:executable |
+ * |
Added: svn:eol-style |
+ LF |