Skip to content

Instantly share code, notes, and snippets.

@tiagosalgado
Last active December 27, 2015 04:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tiagosalgado/7266986 to your computer and use it in GitHub Desktop.
Save tiagosalgado/7266986 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