You are Online

Code used in this page

(function () {
	setInterval(function () {
		var displayOnlineStatus = document.getElementById("online-status"),
			isOnline = navigator.onLine;
			if (isOnline) {
				displayOnlineStatus.innerHTML = "Online";
				displayOnlineStatus.className = "online";
			}
			else {
				displayOnlineStatus.innerHTML = "Offline";
				displayOnlineStatus.className = "offline";
			}
	}, 1000);
})();