| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <include src="keyboard_overlay_data.js"/> | 5 <include src="keyboard_overlay_data.js"/> |
| 6 <include src="keyboard_overlay_accessibility_helper.js"/> | 6 <include src="keyboard_overlay_accessibility_helper.js"/> |
| 7 | 7 |
| 8 var BASE_KEYBOARD = { | 8 var BASE_KEYBOARD = { |
| 9 top: 0, | 9 top: 0, |
| 10 left: 0, | 10 left: 0, |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 if (keyTextValue) { | 338 if (keyTextValue) { |
| 339 keyText.style.visibility = 'visible'; | 339 keyText.style.visibility = 'visible'; |
| 340 } else { | 340 } else { |
| 341 keyText.style.visibility = 'hidden'; | 341 keyText.style.visibility = 'hidden'; |
| 342 } | 342 } |
| 343 keyText.textContent = keyTextValue; | 343 keyText.textContent = keyTextValue; |
| 344 | 344 |
| 345 var shortcutText = $(shortcutTextId(identifier, i)); | 345 var shortcutText = $(shortcutTextId(identifier, i)); |
| 346 if (shortcutId) { | 346 if (shortcutId) { |
| 347 shortcutText.style.visibility = 'visible'; | 347 shortcutText.style.visibility = 'visible'; |
| 348 shortcutText.textContent = loadTimeData.getString('shortcutId'); | 348 shortcutText.textContent = loadTimeData.getString(shortcutId); |
| 349 } else { | 349 } else { |
| 350 shortcutText.style.visibility = 'hidden'; | 350 shortcutText.style.visibility = 'hidden'; |
| 351 } | 351 } |
| 352 | 352 |
| 353 if (keyData.format) { | 353 if (keyData.format) { |
| 354 var format = keyData.format; | 354 var format = keyData.format; |
| 355 if (format == 'left' || format == 'right') { | 355 if (format == 'left' || format == 'right') { |
| 356 shortcutText.style.textAlign = format; | 356 shortcutText.style.textAlign = format; |
| 357 keyText.style.textAlign = format; | 357 keyText.style.textAlign = format; |
| 358 } | 358 } |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 * Handles click events of the learn more link. | 531 * Handles click events of the learn more link. |
| 532 * @param {Event} e Mouse click event. | 532 * @param {Event} e Mouse click event. |
| 533 */ | 533 */ |
| 534 function learnMoreClicked(e) { | 534 function learnMoreClicked(e) { |
| 535 chrome.send('openLearnMorePage'); | 535 chrome.send('openLearnMorePage'); |
| 536 chrome.send('DialogClose'); | 536 chrome.send('DialogClose'); |
| 537 e.preventDefault(); | 537 e.preventDefault(); |
| 538 } | 538 } |
| 539 | 539 |
| 540 document.addEventListener('DOMContentLoaded', init); | 540 document.addEventListener('DOMContentLoaded', init); |
| OLD | NEW |