summaryrefslogtreecommitdiff
path: root/crocoite/data
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2017-11-21 14:45:26 +0100
committerLars-Dominik Braun <lars@6xq.net>2017-11-21 14:45:26 +0100
commit0baf56eb55ab99dceae218247057a0e57ea04057 (patch)
treecccda79e52947743b182516035f4b57afa385d7a /crocoite/data
parentca01f82227a8b79f1cbc4f5e0be5434804dc3c0e (diff)
downloadcrocoite-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.js8
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);