Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html i18n-values=" | 2 <html i18n-values=" |
| 3 dir:textdirection; | 3 dir:textdirection; |
| 4 bookmarkbarattached:bookmarkbarattached; | 4 bookmarkbarattached:bookmarkbarattached; |
| 5 hasattribution:hasattribution; | 5 hasattribution:hasattribution; |
| 6 anim:anim; | 6 anim:anim; |
| 7 syncispresent:syncispresent; | 7 syncispresent:syncispresent; |
| 8 has_3d:has_3d"> | 8 has_3d:has_3d"> |
| 9 <head> | 9 <head> |
| 10 <meta charset="utf-8"> | 10 <meta charset="utf-8"> |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 Date.now() + '">'); | 83 Date.now() + '">'); |
| 84 | 84 |
| 85 function useSmallGrid() { | 85 function useSmallGrid() { |
| 86 return window.innerWidth <= 940; | 86 return window.innerWidth <= 940; |
| 87 } | 87 } |
| 88 | 88 |
| 89 function isRtl() { | 89 function isRtl() { |
| 90 return templateData['textdirection'] == 'rtl'; | 90 return templateData['textdirection'] == 'rtl'; |
| 91 } | 91 } |
| 92 | 92 |
| 93 // This will get overridden in new_new_tab.js | |
| 94 function updateSimpleSection(id, section) { | |
| 95 // All sections start off shown. | |
| 96 if (!(shownSections & section)) | |
| 97 document.getElementById(id).className += ' hidden'; | |
| 98 } | |
| 99 | |
| 100 // Parse any name value pairs passed through the URL hash. | 93 // Parse any name value pairs passed through the URL hash. |
| 101 var hashParams = (function() { | 94 var hashParams = (function() { |
| 102 var result = {}; | 95 var result = {}; |
| 103 if (location.hash.length) { | 96 if (location.hash.length) { |
| 104 location.hash.substr(1).split('&').forEach(function(pair) { | 97 location.hash.substr(1).split('&').forEach(function(pair) { |
| 105 pair = pair.split('='); | 98 pair = pair.split('='); |
| 106 if (pair.length != 2) { | 99 if (pair.length != 2) { |
| 107 throw new Error('Unexpected hash value: ' + location.hash); | 100 throw new Error('Unexpected hash value: ' + location.hash); |
| 108 } | 101 } |
| 109 | 102 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 120 } | 113 } |
| 121 | 114 |
| 122 </script> | 115 </script> |
| 123 </head> | 116 </head> |
| 124 <body class="loading" | 117 <body class="loading" |
| 125 i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"> | 118 i18n-values=".style.fontFamily:fontfamily;.style.fontSize:fontsize"> |
| 126 | 119 |
| 127 <div id="main"> | 120 <div id="main"> |
| 128 | 121 |
| 129 <menu id="option-menu"> | 122 <menu id="option-menu"> |
| 130 <div command="hide" section="THUMB" i18n-content="mostvisited"></div> | |
| 131 <div command="hide" section="RECENT" i18n-content="recentlyclosed"></div> | |
| 132 <hr> | |
| 133 <div command="clear-all-blacklisted" | 123 <div command="clear-all-blacklisted" |
| 134 i18n-content="restorethumbnails"></div> | 124 i18n-content="restorethumbnails"></div> |
| 135 </menu> | 125 </menu> |
| 136 | 126 |
| 137 <div id="notification"> | 127 <div id="notification"> |
| 138 <span> </span> | 128 <span> </span> |
| 139 <span class="link"><span class="link-color"></span></span> | 129 <span class="link"><span class="link-color"></span></span> |
| 140 </div> | 130 </div> |
| 141 | 131 |
| 142 <div class="sections"> | 132 <div class="sections"> |
| 143 <div class="section" section="APPS" id="apps-section"> | 133 <div class="section" section="APPS" id="apps-section"> |
| 144 <h2><img src="ntp/ntp_disclosure_triangle.png" | 134 <h2><img class="disclosure" img src="ntp/ntp_disclosure_triangle.png" |
|
arv (Not doing code reviews)
2010/08/31 21:13:59
stray img attribute
| |
| 145 ><span i18n-content="apps"></span></h2> | 135 ><span i18n-content="apps"></span><div class="back"></div></h2> |
| 146 <div id="apps-section-content"></div> | 136 <div class="maxiview" id="apps-section-content"></div> |
| 147 <div class="miniview"></div> | 137 <div class="miniview"></div> |
| 148 </div> | 138 </div> |
| 149 | 139 |
| 150 <div id="most-visited-section" class="section" section="THUMB"> | 140 <div id="most-visited-section" class="section" section="THUMB"> |
| 151 <h2><img src="ntp/ntp_disclosure_triangle.png" | 141 <h2><img class="disclosure" src="ntp/ntp_disclosure_triangle.png" |
| 152 ><span i18n-content="mostvisited"></span></h2> | 142 ><span i18n-content="mostvisited"></span |
| 153 <div id="most-visited"></div> | 143 ><div class="settings"></div><div class="back"></div></h2> |
| 144 <div class="maxiview" id="most-visited"></div> | |
| 154 <div class="miniview"></div> | 145 <div class="miniview"></div> |
| 155 </div> | 146 </div> |
| 156 | 147 |
| 157 <!-- Start this section disabled because it might not have data, and looks | 148 <!-- Start this section disabled because it might not have data, and looks |
| 158 silly without any. --> | 149 silly without any. --> |
| 159 <div id="recently-closed" class="section hidden disabled" section="RECENT" | 150 <div id="recently-closed" class="section hidden disabled" section="RECENT" |
| 160 noexpand="true"> | 151 noexpand="true"> |
| 161 <h2><span i18n-content="recentlyclosed"></span></h2> | 152 <h2><span i18n-content="recentlyclosed"></span |
| 153 ><div class="back"></div></h2> | |
| 162 <div class="miniview"></div> | 154 <div class="miniview"></div> |
| 163 </div> | 155 </div> |
| 164 | 156 |
| 157 <!-- TODO(aa): Remove this -- we don't use it anymore. --> | |
| 165 <div id="debug" class="section disabled" section="DEBUG"> | 158 <div id="debug" class="section disabled" section="DEBUG"> |
| 166 <h2><span>Debug</span></h2> | 159 <h2><span>Debug</span></h2> |
| 167 <div id="apps-launch-control"> | 160 <div id="apps-launch-control"> |
| 168 Open apps in:<label | 161 Open apps in:<label |
| 169 ><input type="radio" name="launch-container-type" value="" | 162 ><input type="radio" name="launch-container-type" value="" |
| 170 checked="true">Default</label | 163 checked="true">Default</label |
| 171 ><input type="radio" name="launch-container-type" value="tab" | 164 ><input type="radio" name="launch-container-type" value="tab" |
| 172 >Tab</label | 165 >Tab</label |
| 173 ><label><input type="radio" name="launch-container-type" value="window" | 166 ><label><input type="radio" name="launch-container-type" value="window" |
| 174 >Window</label | 167 >Window</label |
| 175 ><label><input type="radio" name="launch-container-type" value="panel" | 168 ><label><input type="radio" name="launch-container-type" value="panel" |
| 176 >Panel</label> | 169 >Panel</label> |
| 177 </div> | 170 </div> |
| 178 </div> | 171 </div> |
| 179 </div> | 172 </div> |
| 180 | 173 |
| 181 <script> | |
| 182 updateSimpleSection('apps-section', Section.APPS); | |
| 183 updateSimpleSection('most-visited-section', Section.THUMB); | |
| 184 updateSimpleSection('recently-closed', Section.RECENT); | |
| 185 updateSimpleSection('debug', Section.DEBUG); | |
| 186 </script> | |
| 187 | |
| 188 <div id="sync-status"> | 174 <div id="sync-status"> |
| 189 <h2></h2> | 175 <h2></h2> |
| 190 <span></span> | 176 <span></span> |
| 191 </div> | 177 </div> |
| 192 | 178 |
| 193 <div id="attribution" class="attribution"> | 179 <div id="attribution" class="attribution"> |
| 194 <div i18n-content="attributionintro"></div> | 180 <div i18n-content="attributionintro"></div> |
| 195 <img id="attribution-img"> | 181 <img id="attribution-img"> |
| 196 </div> | 182 </div> |
| 197 | 183 |
| 198 </div> <!-- main --> | 184 </div> <!-- main --> |
| 199 | 185 |
| 200 <div class="window-menu" id="window-tooltip"></div> | 186 <div class="window-menu" id="window-tooltip"></div> |
| 201 | 187 |
| 202 </body> | 188 </body> |
| 203 | 189 |
| 204 <script src="shared/js/i18n_template.js"></script> | 190 <script src="shared/js/i18n_template.js"></script> |
| 205 <script> | 191 <script> |
| 206 i18nTemplate.process(document, templateData); | 192 i18nTemplate.process(document, templateData); |
| 207 </script> | 193 </script> |
| 208 <script src="shared/js/local_strings.js"></script> | 194 <script src="shared/js/local_strings.js"></script> |
| 209 <script src="shared/js/class_list.js"></script> | 195 <script src="shared/js/class_list.js"></script> |
| 210 <script src="shared/js/parse_html_subset.js"></script> | 196 <script src="shared/js/parse_html_subset.js"></script> |
| 211 <script src="ntp/util.js"></script> | 197 <script src="ntp/util.js"></script> |
| 212 <script src="ntp/most_visited.js"></script> | 198 <script src="ntp/most_visited.js"></script> |
| 213 <script src="new_new_tab.js"></script> | 199 <script src="new_new_tab.js"></script> |
| 214 <script src="ntp/apps.js"></script> | 200 <script src="ntp/apps.js"></script> |
| 201 | |
| 202 <script> | |
| 203 updateSimpleSection('apps-section', Section.APPS); | |
| 204 updateSimpleSection('most-visited-section', Section.THUMB); | |
| 205 updateSimpleSection('recently-closed', Section.RECENT); | |
| 206 updateSimpleSection('debug', Section.DEBUG); | |
|
arv (Not doing code reviews)
2010/08/31 21:13:59
Can this be done earlier?
| |
| 207 | |
| 208 layoutSections(); | |
| 209 </script> | |
| 215 </html> | 210 </html> |
| OLD | NEW |