Skip to content

Instantly share code, notes, and snippets.

@jerkovicl
Forked from tiagosalgado/demo_offlinejs
Created November 29, 2013 14:55
Show Gist options
  • Save jerkovicl/7706897 to your computer and use it in GitHub Desktop.
Save jerkovicl/7706897 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script src="http://github.hubspot.com/offline/offline.min.js"></script>
<script src="http://github.hubspot.com/offline/js/snake.js"></script>
<link rel="stylesheet" href="http://github.hubspot.com/offline/themes/offline-theme-chrome.css" />
<script>
Offline.options = {
game: false,
checks: {
image: {
url: 'http://yourcustomurl.com/offlinejs/my-image.gif'
}
}
}
var run = function(){
if (Offline.state === 'up')
Offline.check();
}
setInterval(run, 5000);
</script>
</head>
<body>
<div class="offline-ui offline-ui-up">
<div class="offline-ui-content">
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment