Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Unified Diff: chrome/browser/resources/access_chromevox/chromevox/background/options.html

Issue 6254007: Adding ChromeVox as a component extensions (enabled only for ChromeOS, for no... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698