mirror of
https://github.com/flutter/flutter
synced 2024-10-13 11:42:54 +00:00
a0df465d10
TBR=esprehn Review URL: https://codereview.chromium.org/758753003
50 lines
1.2 KiB
Plaintext
50 lines
1.2 KiB
Plaintext
<!--
|
|
// Copyright 2014 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
-->
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport"
|
|
content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=yes, width=device-width">
|
|
<import src="city-list.sky" />
|
|
<style>
|
|
html, body {
|
|
margin: 0;
|
|
padding: 0;
|
|
font-family: "Roboto", "HelveticaNeue",sans-serif;
|
|
-webkit-font-smoothing: antialiased;
|
|
font-size: 13px;
|
|
color: #222;
|
|
width: 100%;
|
|
height: 100%;
|
|
-webkit-user-select: none;
|
|
}
|
|
</style>
|
|
</head>
|
|
<script>
|
|
window.startLoad = new Date().getTime();
|
|
</script>
|
|
<body>
|
|
<city-list></city-list>
|
|
<script>
|
|
var cityList = document.querySelector('city-list');
|
|
var scrollBy = location.search.match(/auto=([0-9]+)/)[1];
|
|
|
|
function autoScroll() {
|
|
cityList.scrollBy(scrollBy);
|
|
requestAnimationFrame(autoScroll);
|
|
}
|
|
|
|
if (scrollBy) {
|
|
console.log('Autoscroll by ' + scrollBy);
|
|
setTimeout(function() {
|
|
requestAnimationFrame(autoScroll);
|
|
}, 200)
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|