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

Side by Side Diff: ui/accessibility/extensions/longdesc/options.js

Issue 593293002: Initial checkin of accessibility extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix license issues Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « ui/accessibility/extensions/longdesc/options.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /* Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. */
4
5 // Saves options to chrome.storage
6 function save_options() {
7 var border = document.getElementById('border').checked;
8 chrome.storage.sync.set({
9 addBorder: border
10 }, function() {
11 // Update status to let user know options were saved.
12 var status = document.getElementById('status');
13 status.textContent = 'Options saved.';
14 setTimeout(function() {
15 status.textContent = '';
16 }, 750);
17 });
18 }
19
20 // Restores select box and checkbox state using the preferences
21 // stored in chrome.storage.
22 function restore_options() {
23 // Use default value addBOrder = false.
24 chrome.storage.sync.get("addBorder", function(item) {
25 document.getElementById('border').checked = item.addBorder;
26 });
27 }
28
29 document.addEventListener('DOMContentLoaded', restore_options);
30 document.getElementById('border').addEventListener('click', save_options);
OLDNEW
« no previous file with comments | « ui/accessibility/extensions/longdesc/options.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698