Scriptlet to check Garoa Hacker Clube status
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:function handleResponse() {var data = JSON.parse(req.response); var strStatus = data.open? "Open": "Closed"; var dateLastchange = new Date(data.lastchange*1000); strStatus+=" ( "+dateLastchange.getHours()+":"+dateLastchange.getMinutes()+" "+dateLastchange.getDate()+"/"+(dateLastchange.getMonth()+1)+"/"+dateLastchange.getFullYear()+" )"; alert(strStatus);} req = new XMLHttpRequest();req.onload = handleResponse;req.open("GET","http://status.garoa.net.br/status", true);req.send(null); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment