Skip to content

Instantly share code, notes, and snippets.

@alexpersian
Created November 23, 2014 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexpersian/e1e07169f3c5c0f19eae to your computer and use it in GitHub Desktop.
Save alexpersian/e1e07169f3c5c0f19eae to your computer and use it in GitHub Desktop.
VYLZdw
<h1>Halo: The Master Chief Collection</h1>
<p id="status">SEARCHING FOR PLAYERS...</p>
var count = 0;
var message = document.getElementById("status");
setInterval(function() {
if (count === 0) {
message.innerHTML = "SEARCHING FOR PLAYERS...";
count++;
} else if (count === 1) {
message.innerHTML = "PLAYERS FOUND...";
count++;
} else if (count === 2) {
message.innerHTML = "CONNECTING SESSION...";
count++;
} else if (count === 3) {
alert("Connection to the host has failed.");
count = 0;
} else {
count = 0;
}
}, 5000)
h1 {
text-align: center
}
p {
text-align: center
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment