Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type='text/javascript'>
- (function()
- {
- if( window.localStorage )
- {
- if( !localStorage.getItem( 'firstLoad' ) )
- {
- localStorage[ 'firstLoad' ] = true;
- window.location.reload();
- }
- else
- localStorage.removeItem( 'firstLoad' );
- }
- })();
- </script>
- <script type="text/javascript">
- ;(function () {
- var reloads = [2000, 13000],
- storageKey = 'reloadIndex',
- reloadIndex = parseInt(localStorage.getItem(storageKey), 10) || 0;
- if (reloadIndex >= reloads.length || isNaN(reloadIndex)) {
- localStorage.removeItem(storageKey);
- return;
- }
- setTimeout(function(){
- window.location.reload();
- }, reloads[reloadIndex]);
- localStorage.setItem(storageKey, parseInt(reloadIndex, 10) + 1);
- }());
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement