Commit 76ef4db5 authored by Rafael Weinstein's avatar Rafael Weinstein

fix the fix to city-list example autoscroll

TBR=esprehn

Review URL: https://codereview.chromium.org/760403002
parent 034e1930
......@@ -31,7 +31,11 @@ window.startLoad = new Date().getTime();
<city-list></city-list>
<script>
var cityList = document.querySelector('city-list');
var scrollBy = Number(location.search.match(/auto=([0-9]+)/)[1]);
var scrollBy = 0;
var toks = location.search.match(/auto=([0-9]+)/);
if (toks) {
scrollBy = Number(toks[1]);
}
function autoScroll() {
cityList.scrollBy(scrollBy);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment