OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html id="t" jsvalues="dir:textdirection;firstview:firstview"> | 2 <html id="t" jsvalues="dir:textdirection;firstview:firstview;bookmarkbarattached
:bookmarkbarattached;"> |
3 <!-- | 3 <!-- |
4 This page is optimized for perceived performance. Our enemies are the time | 4 This page is optimized for perceived performance. Our enemies are the time |
5 taken for the backend to generate our data, and the time taken to parse | 5 taken for the backend to generate our data, and the time taken to parse |
6 and render the starting HTML/CSS content of the page. This page is | 6 and render the starting HTML/CSS content of the page. This page is |
7 designed to let Chrome do both of those things in parallel. | 7 designed to let Chrome do both of those things in parallel. |
8 | 8 |
9 1. Defines temporary content callback functions | 9 1. Defines temporary content callback functions |
10 2. Fires off requests for content (these can come back 20-150ms later) | 10 2. Fires off requests for content (these can come back 20-150ms later) |
11 3. Defines basic functions (handlers) | 11 3. Defines basic functions (handlers) |
12 4. Renders a fast-parse hard-coded version of itself (this can take 20-50ms) | 12 4. Renders a fast-parse hard-coded version of itself (this can take 20-50ms) |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 logEvent('log start'); | 127 logEvent('log start'); |
128 </script> | 128 </script> |
129 <head> | 129 <head> |
130 <meta charset="utf-8"> | 130 <meta charset="utf-8"> |
131 <title jscontent="title"></title> | 131 <title jscontent="title"></title> |
132 <style> | 132 <style> |
133 html { | 133 html { |
134 height:100%; | 134 height:100%; |
135 } | 135 } |
136 body { | 136 body { |
137 background-color:white; | |
138 margin:0px; | 137 margin:0px; |
139 background-repeat:repeat-x; | |
140 } | 138 } |
141 html[firstview='true'] #main { | 139 html[firstview='true'] #main { |
142 opacity:0.0; | 140 opacity:0.0; |
143 -webkit-transition:all 0.4s; | 141 -webkit-transition:all 0.4s; |
144 } | 142 } |
145 html[firstview='true'] #main.visible { | 143 html[firstview='true'] #main.visible { |
146 opacity:1.0; | 144 opacity:1.0; |
147 } | 145 } |
148 #main { | 146 #main { |
149 margin-left:auto; | 147 margin-left:auto; |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 </div> | 431 </div> |
434 </td> | 432 </td> |
435 <td valign="top" width="230"> | 433 <td valign="top" width="230"> |
436 <div align="right"> | 434 <div align="right"> |
437 <img src="../../app/theme/%DISTRIBUTION%/product_logo.png" | 435 <img src="../../app/theme/%DISTRIBUTION%/product_logo.png" |
438 width="145" height="52" style="padding-bottom:8px;" /> | 436 width="145" height="52" style="padding-bottom:8px;" /> |
439 </div> | 437 </div> |
440 <iframe id="p13n" frameborder="0" width="100%" scrolling="no" height="0" | 438 <iframe id="p13n" frameborder="0" width="100%" scrolling="no" height="0" |
441 jsdisplay="p13nsrc" style="display:none;" | 439 jsdisplay="p13nsrc" style="display:none;" |
442 jsvalues="src:p13nsrc"></iframe> | 440 jsvalues="src:p13nsrc"></iframe> |
443 <div id="searches" class="sidebar"> | 441 <div id="searches" class="sidebar themed"> |
444 <div class="section-title" jscontent="searches"></div> | 442 <div class="section-title" jscontent="searches"></div> |
445 <form onsubmit="chrome.send('searchHistoryPage', [this.search.value]); ret
urn false;"> | 443 <form onsubmit="chrome.send('searchHistoryPage', [this.search.value]); ret
urn false;"> |
446 <input type="text" class="hint" | 444 <input type="text" class="hint" |
447 name="search" | 445 name="search" |
448 style="background-image:url(chrome://favicon/);" | 446 style="background-image:url(chrome://favicon/);" |
449 jsvalues="placeholder:searchhistory"> | 447 jsvalues="placeholder:searchhistory"> |
450 </form> | 448 </form> |
451 <div id='searches-entries'></div> | 449 <div id='searches-entries'></div> |
452 </div> | 450 </div> |
453 | 451 |
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
929 } | 927 } |
930 | 928 |
931 function restoreThumbnails() { | 929 function restoreThumbnails() { |
932 exitEditMode(); | 930 exitEditMode(); |
933 chrome.send('clearMostVisitedURLsBlacklist'); | 931 chrome.send('clearMostVisitedURLsBlacklist'); |
934 } | 932 } |
935 | 933 |
936 function themeChanged() { | 934 function themeChanged() { |
937 $('themecss').href = 'chrome://theme/css/newtab.css?' + Date.now(); | 935 $('themecss').href = 'chrome://theme/css/newtab.css?' + Date.now(); |
938 } | 936 } |
| 937 function bookmarkBarAttached() { |
| 938 document.documentElement.setAttribute("bookmarkbarattached", "true"); |
| 939 } |
| 940 function bookmarkBarDetached() { |
| 941 document.documentElement.setAttribute("bookmarkbarattached", "false"); |
| 942 } |
939 | 943 |
940 function viewLog() { | 944 function viewLog() { |
941 var lines = []; | 945 var lines = []; |
942 var start = log[0][1]; | 946 var start = log[0][1]; |
943 | 947 |
944 for (var i = 0; i < log.length; i++) { | 948 for (var i = 0; i < log.length; i++) { |
945 lines.push((log[i][1] - start) + ': ' + log[i][0]); | 949 lines.push((log[i][1] - start) + ': ' + log[i][0]); |
946 } | 950 } |
947 | 951 |
948 var lognode = document.createElement('pre'); | 952 var lognode = document.createElement('pre'); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
992 background: url(chrome://theme/newtab_closed_window); | 996 background: url(chrome://theme/newtab_closed_window); |
993 background-repeat: no-repeat; | 997 background-repeat: no-repeat; |
994 } | 998 } |
995 html[dir='rtl'] .recent-window-container { | 999 html[dir='rtl'] .recent-window-container { |
996 background-position: right; | 1000 background-position: right; |
997 padding-right: 22px; | 1001 padding-right: 22px; |
998 } | 1002 } |
999 </style> | 1003 </style> |
1000 | 1004 |
1001 </html> | 1005 </html> |
OLD | NEW |