| OLD | NEW |
| (Empty) | |
| 1 <!doctype html> |
| 2 <!-- |
| 3 Copyright 2016 The Chromium Authors. All rights reserved. |
| 4 Use of this source code is governed by a BSD-style license that can be |
| 5 found in the LICENSE file. |
| 6 --> |
| 7 <html> |
| 8 <head> |
| 9 <style> |
| 10 html, body { |
| 11 margin: 0; |
| 12 padding: 0; |
| 13 } |
| 14 </style> |
| 15 </head> |
| 16 <script> |
| 17 var line = ""; |
| 18 for (i = 0; i < 1000; i++) { |
| 19 for (j = 1000; j < 1080; j++) { |
| 20 line += (i+j).toString(); |
| 21 } |
| 22 line += "\n"; |
| 23 } |
| 24 document.write(line); |
| 25 |
| 26 var total = 0; |
| 27 var direction = 1; |
| 28 |
| 29 function scrollByRaf() { |
| 30 total += direction; |
| 31 window.scrollBy(0, direction); |
| 32 if (total > 9000 || total < 0) |
| 33 direction = -direction; |
| 34 window.requestAnimationFrame(scrollByRaf); |
| 35 } |
| 36 window.onload = scrollByRaf; |
| 37 </script> |
| 38 </html> |
| OLD | NEW |