Created
June 30, 2010 15:06
-
-
Save cowboy/458768 to your computer and use it in GitHub Desktop.
Something simple for testing slow loading pages
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Block page loading, for testing ready events / etc. | |
function block( delay ) { | |
var html = '<script src="http://1.cuzillion.com/bin/resource.cgi?type=js&sleep=' | |
+ delay + '&jsdelay=' + delay + '&t=' + +new Date + '"><\/script>'; | |
document.write( html ); | |
}; | |
/* | |
Sample usage. Block page loading for 1 second: | |
<script type="text/javascript">block(1);</script> | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment