| OLD | NEW |
| (Empty) |
| 1 <!-- | |
| 2 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 3 // Use of this source code is governed by a BSD-style license that can be | |
| 4 // found in the LICENSE file. | |
| 5 --> | |
| 6 <!DOCTYPE html> | |
| 7 <html> | |
| 8 <head> | |
| 9 <meta charset="utf-8"> | |
| 10 <meta name="viewport" | |
| 11 content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-sca
lable=yes, width=device-width"> | |
| 12 <import src="city-list.sky" /> | |
| 13 <style> | |
| 14 html, body { | |
| 15 margin: 0; | |
| 16 padding: 0; | |
| 17 font-family: "Roboto", "HelveticaNeue",sans-serif; | |
| 18 -webkit-font-smoothing: antialiased; | |
| 19 font-size: 13px; | |
| 20 color: #222; | |
| 21 width: 100%; | |
| 22 height: 100%; | |
| 23 -webkit-user-select: none; | |
| 24 } | |
| 25 </style> | |
| 26 </head> | |
| 27 <script> | |
| 28 window.startLoad = new Date().getTime(); | |
| 29 </script> | |
| 30 <body> | |
| 31 <city-list></city-list> | |
| 32 <script> | |
| 33 var cityList = document.querySelector('city-list'); | |
| 34 var scrollBy = 0; | |
| 35 var toks = location.search.match(/auto=([0-9]+)/); | |
| 36 if (toks) { | |
| 37 scrollBy = Number(toks[1]); | |
| 38 } | |
| 39 | |
| 40 function autoScroll() { | |
| 41 cityList.scrollBy(scrollBy); | |
| 42 requestAnimationFrame(autoScroll); | |
| 43 } | |
| 44 | |
| 45 if (scrollBy) { | |
| 46 setTimeout(function() { | |
| 47 requestAnimationFrame(autoScroll); | |
| 48 }, 200) | |
| 49 } | |
| 50 </script> | |
| 51 </body> | |
| 52 </html> | |
| OLD | NEW |