OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 982 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
993 | 993 |
994 if (configData.isGooglePage) { | 994 if (configData.isGooglePage) { |
995 var logo = document.createElement('div'); | 995 var logo = document.createElement('div'); |
996 logo.id = IDS.LOGO; | 996 logo.id = IDS.LOGO; |
997 | 997 |
998 fakebox = document.createElement('div'); | 998 fakebox = document.createElement('div'); |
999 fakebox.id = IDS.FAKEBOX; | 999 fakebox.id = IDS.FAKEBOX; |
1000 var fakeboxHtml = []; | 1000 var fakeboxHtml = []; |
1001 fakeboxHtml.push('<input id="' + IDS.FAKEBOX_INPUT + | 1001 fakeboxHtml.push('<input id="' + IDS.FAKEBOX_INPUT + |
1002 '" autocomplete="off" tabindex="-1" aria-hidden="true">'); | 1002 '" autocomplete="off" tabindex="-1" aria-hidden="true">'); |
1003 if (NTP_DESIGN.showFakeboxHint && configData.searchboxPlaceholder) { | 1003 if (NTP_DESIGN.showFakeboxHint && |
| 1004 configData.translatedStrings.searchboxPlaceholder) { |
1004 fakeboxHtml.push('<div id="' + IDS.FAKEBOX_TEXT + '">' + | 1005 fakeboxHtml.push('<div id="' + IDS.FAKEBOX_TEXT + '">' + |
1005 configData.searchboxPlaceholder + '</div>'); | 1006 configData.translatedStrings.searchboxPlaceholder + '</div>'); |
1006 } | 1007 } |
1007 fakeboxHtml.push('<div id="cursor"></div>'); | 1008 fakeboxHtml.push('<div id="cursor"></div>'); |
1008 fakebox.innerHTML = fakeboxHtml.join(''); | 1009 fakebox.innerHTML = fakeboxHtml.join(''); |
1009 | 1010 |
1010 ntpContents.insertBefore(fakebox, ntpContents.firstChild); | 1011 ntpContents.insertBefore(fakebox, ntpContents.firstChild); |
1011 ntpContents.insertBefore(logo, ntpContents.firstChild); | 1012 ntpContents.insertBefore(logo, ntpContents.firstChild); |
1012 } else { | 1013 } else { |
1013 document.body.classList.add(CLASSES.NON_GOOGLE_PAGE); | 1014 document.body.classList.add(CLASSES.NON_GOOGLE_PAGE); |
1014 } | 1015 } |
1015 | 1016 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1109 | 1110 |
1110 return { | 1111 return { |
1111 init: init, | 1112 init: init, |
1112 listen: listen | 1113 listen: listen |
1113 }; | 1114 }; |
1114 } | 1115 } |
1115 | 1116 |
1116 if (!window.localNTPUnitTest) { | 1117 if (!window.localNTPUnitTest) { |
1117 LocalNTP().listen(); | 1118 LocalNTP().listen(); |
1118 } | 1119 } |
OLD | NEW |