diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2017-11-21 14:45:26 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2017-11-21 14:45:26 +0100 |
commit | 0baf56eb55ab99dceae218247057a0e57ea04057 (patch) | |
tree | cccda79e52947743b182516035f4b57afa385d7a /crocoite/data | |
parent | ca01f82227a8b79f1cbc4f5e0be5434804dc3c0e (diff) | |
download | crocoite-0baf56eb55ab99dceae218247057a0e57ea04057.tar.gz crocoite-0baf56eb55ab99dceae218247057a0e57ea04057.tar.bz2 crocoite-0baf56eb55ab99dceae218247057a0e57ea04057.zip |
Graceful page load timeout
Stop scrolling script, wait for remaining resources to load.
Diffstat (limited to 'crocoite/data')
-rw-r--r-- | crocoite/data/scroll.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crocoite/data/scroll.js b/crocoite/data/scroll.js index cf060fc..d16383c 100644 --- a/crocoite/data/scroll.js +++ b/crocoite/data/scroll.js @@ -1,7 +1,11 @@ (function(){ function scroll (event) { - window.scrollBy (0, window.innerHeight/2); - return true; + if (__crocoite_stop__) { + return false; + } else { + window.scrollBy (0, window.innerHeight/2); + return true; + } } function onload (event) { window.setInterval (scroll, 200); |