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 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 ntpContents = $(IDS.NTP_CONTENTS); | 1075 ntpContents = $(IDS.NTP_CONTENTS); |
1076 | 1076 |
1077 if (configData.isGooglePage) { | 1077 if (configData.isGooglePage) { |
1078 var logo = document.createElement('div'); | 1078 var logo = document.createElement('div'); |
1079 logo.id = IDS.LOGO; | 1079 logo.id = IDS.LOGO; |
1080 | 1080 |
1081 fakebox = document.createElement('div'); | 1081 fakebox = document.createElement('div'); |
1082 fakebox.id = IDS.FAKEBOX; | 1082 fakebox.id = IDS.FAKEBOX; |
1083 var fakeboxHtml = []; | 1083 var fakeboxHtml = []; |
1084 fakeboxHtml.push('<input id="' + IDS.FAKEBOX_INPUT + | 1084 fakeboxHtml.push('<input id="' + IDS.FAKEBOX_INPUT + |
1085 '" autocomplete="off" tabindex="-1" aria-hidden="true">'); | 1085 '" autocomplete="off" tabindex="-1" type="url" aria-hidden="true">'); |
1086 fakeboxHtml.push('<div id="' + IDS.FAKEBOX_TEXT + '"></div>'); | 1086 fakeboxHtml.push('<div id="' + IDS.FAKEBOX_TEXT + '"></div>'); |
1087 fakeboxHtml.push('<div id="cursor"></div>'); | 1087 fakeboxHtml.push('<div id="cursor"></div>'); |
1088 fakebox.innerHTML = fakeboxHtml.join(''); | 1088 fakebox.innerHTML = fakeboxHtml.join(''); |
1089 | 1089 |
1090 ntpContents.insertBefore(fakebox, ntpContents.firstChild); | 1090 ntpContents.insertBefore(fakebox, ntpContents.firstChild); |
1091 ntpContents.insertBefore(logo, ntpContents.firstChild); | 1091 ntpContents.insertBefore(logo, ntpContents.firstChild); |
1092 } else { | 1092 } else { |
1093 document.body.classList.add(CLASSES.NON_GOOGLE_PAGE); | 1093 document.body.classList.add(CLASSES.NON_GOOGLE_PAGE); |
1094 } | 1094 } |
1095 | 1095 |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1196 | 1196 |
1197 return { | 1197 return { |
1198 init: init, | 1198 init: init, |
1199 listen: listen | 1199 listen: listen |
1200 }; | 1200 }; |
1201 } | 1201 } |
1202 | 1202 |
1203 if (!window.localNTPUnitTest) { | 1203 if (!window.localNTPUnitTest) { |
1204 LocalNTP().listen(); | 1204 LocalNTP().listen(); |
1205 } | 1205 } |
OLD | NEW |