Sha256: 8e7e9f24b16b13a318bdb23ebef12efadcce90bcb235d34448b4ac8aff315453
Contents?: true
Size: 609 Bytes
Versions: 18
Compression:
Stored size: 609 Bytes
Contents
pageflow.ProgressivePreload = function() { var run = null; function Run(page) { var cancelled = false; this.cancel = function() { cancelled = true; }; this.start = function() { return preload(page); }; function preload(page) { return $.when(page.page('preload')).pipe(function() { var nextPage = page.next('.page'); if (!cancelled && nextPage.length) { return preload(nextPage); } }); } } this.start = function(page) { if (run) { run.cancel(); } run = new Run(page); run.start(); }; };
Version data entries
18 entries across 18 versions & 1 rubygems