| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 | 5 |
| 6 /** | 6 /** |
| 7 * @fileoverview The local InstantExtended NTP. | 7 * @fileoverview The local InstantExtended NTP. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 | 10 |
| (...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 } else { | 763 } else { |
| 764 document.body.classList.add(CLASSES.NON_GOOGLE_PAGE); | 764 document.body.classList.add(CLASSES.NON_GOOGLE_PAGE); |
| 765 } | 765 } |
| 766 | 766 |
| 767 // Modify design for experimental icon NTP, if specified. | 767 // Modify design for experimental icon NTP, if specified. |
| 768 if (configData.useIcons) | 768 if (configData.useIcons) |
| 769 modifyNtpDesignForIcons(); | 769 modifyNtpDesignForIcons(); |
| 770 document.querySelector('#ntp-contents').classList.add(NTP_DESIGN.mainClass); | 770 document.querySelector('#ntp-contents').classList.add(NTP_DESIGN.mainClass); |
| 771 | 771 |
| 772 // Hide notifications after fade out, so we can't focus on links via keyboard. | 772 // Hide notifications after fade out, so we can't focus on links via keyboard. |
| 773 notification.addEventListener('webkitTransitionEnd', hideNotification); | 773 notification.addEventListener('transitionend', hideNotification); |
| 774 | 774 |
| 775 var notificationMessage = $(IDS.NOTIFICATION_MESSAGE); | 775 var notificationMessage = $(IDS.NOTIFICATION_MESSAGE); |
| 776 notificationMessage.textContent = | 776 notificationMessage.textContent = |
| 777 configData.translatedStrings.thumbnailRemovedNotification; | 777 configData.translatedStrings.thumbnailRemovedNotification; |
| 778 | 778 |
| 779 var undoLink = $(IDS.UNDO_LINK); | 779 var undoLink = $(IDS.UNDO_LINK); |
| 780 undoLink.addEventListener('click', onUndo); | 780 undoLink.addEventListener('click', onUndo); |
| 781 registerKeyHandler(undoLink, KEYCODE.ENTER, onUndo); | 781 registerKeyHandler(undoLink, KEYCODE.ENTER, onUndo); |
| 782 undoLink.textContent = configData.translatedStrings.undoThumbnailRemove; | 782 undoLink.textContent = configData.translatedStrings.undoThumbnailRemove; |
| 783 | 783 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 | 898 |
| 899 return { | 899 return { |
| 900 init: init, | 900 init: init, |
| 901 listen: listen | 901 listen: listen |
| 902 }; | 902 }; |
| 903 } | 903 } |
| 904 | 904 |
| 905 if (!window.localNTPUnitTest) { | 905 if (!window.localNTPUnitTest) { |
| 906 LocalNTP().listen(); | 906 LocalNTP().listen(); |
| 907 } | 907 } |
| OLD | NEW |