This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
reValuate/Website/scripts/getCurrentCoins.js
Yamozha 1f543cae6f Changed the purpose of the repo
Changed from k4li -> currency project
2021-02-03 17:28:43 +02:00

17 lines
394 B
JavaScript

function currencyTicker(){
var ws = new WebSocket("ws://localhost:8765/");
ws.onopen = function(){
console.log("Connection is Established");
ws.send("STATUSONCOIN");
};
ws.onmessage = function(evt) {
var received_msg = evt.data;
w = document.getElementById("odometer").innerHTML = received_msg;
};
}
currencyTicker()
var t=setInterval(currencyTicker,5000);