diff --git a/website/error.html b/website/error.html new file mode 100644 index 0000000..d4249a5 --- /dev/null +++ b/website/error.html @@ -0,0 +1,143 @@ + + + + + Jrtechs Steam Friend Graph Project + + + + + + + + + + +
+


+ +

My Steam websocket server down.

+

Sorry about that, you should try again some other day.

+ +

+
+ + + + + + + + + + + + + diff --git a/website/graph.html b/website/graph.html index b9b9c82..4bc8404 100644 --- a/website/graph.html +++ b/website/graph.html @@ -187,6 +187,16 @@ /** Web socket to communicate with the steam friend java server */ connection = new WebSocket('ws://localhost:4444'); + + setTimeout(function() + { + if (this.connection.readyState != 1) { + console.log("fuck"); + document.location.href = "error.html"; + } + }, 3000); + + /** * When the web socket is opened, this function * fetches the get data and requests the server diff --git a/website/img/404.jpg b/website/img/404.jpg new file mode 100755 index 0000000..2de142b Binary files /dev/null and b/website/img/404.jpg differ