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

Side by Side Diff: ui/accessibility/extensions/highcontrast/popup.js

Issue 610453002: Move accessibility extension translations to grd file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var site; 5 var site;
6 var key1; 6 var key1;
7 var key2; 7 var key2;
8 8
9 function setRadio(name, value) { 9 function setRadio(name, value) {
10 var radios = document.querySelectorAll('input[name="' + name + '"]'); 10 var radios = document.querySelectorAll('input[name="' + name + '"]');
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 radios[i].addEventListener('change', function(evt) { 86 radios[i].addEventListener('change', function(evt) {
87 onRadioChange(evt.target.name, evt.target.value); 87 onRadioChange(evt.target.name, evt.target.value);
88 }, false); 88 }, false);
89 radios[i].addEventListener('click', function(evt) { 89 radios[i].addEventListener('click', function(evt) {
90 onRadioChange(evt.target.name, evt.target.value); 90 onRadioChange(evt.target.name, evt.target.value);
91 }, false); 91 }, false);
92 } 92 }
93 } 93 }
94 94
95 function init() { 95 function init() {
96 var i18nElements = document.querySelectorAll('*[i18n-content]');
97 for (var i = 0; i < i18nElements.length; i++) {
98 var elem = i18nElements[i];
99 var msg = elem.getAttribute('i18n-content');
100 elem.innerHTML = chrome.i18n.getMessage(msg);
101 }
102
96 addRadioListeners('keyaction'); 103 addRadioListeners('keyaction');
97 addRadioListeners('apply'); 104 addRadioListeners('apply');
98 addRadioListeners('scheme'); 105 addRadioListeners('scheme');
99 $('toggle').addEventListener('click', onToggle, false); 106 $('toggle').addEventListener('click', onToggle, false);
100 $('make_default').addEventListener('click', onMakeDefault, false); 107 $('make_default').addEventListener('click', onMakeDefault, false);
101 $('forget').addEventListener('click', onForget, false); 108 $('forget').addEventListener('click', onForget, false);
102 if (navigator.appVersion.indexOf('Mac') != -1) { 109 if (navigator.appVersion.indexOf('Mac') != -1) {
103 key1 = '&#x2318;+Shift+F11'; 110 key1 = '&#x2318;+Shift+F11';
104 key2 = '&#x2318;+Shift+F12'; 111 key2 = '&#x2318;+Shift+F12';
105 } else { 112 } else {
(...skipping 17 matching lines...) Expand all
123 update(); 130 update();
124 return; 131 return;
125 } 132 }
126 } 133 }
127 site = 'unknown site'; 134 site = 'unknown site';
128 update(); 135 update();
129 }); 136 });
130 } 137 }
131 138
132 window.addEventListener('load', init, false); 139 window.addEventListener('load', init, false);
OLDNEW
« no previous file with comments | « ui/accessibility/extensions/highcontrast/popup.html ('k') | ui/accessibility/extensions/longdesc/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698