From 0b8e3d71505997b887c15325dab3b2f34aceeb1f Mon Sep 17 00:00:00 2001 From: Santiago Lema Date: Sat, 2 May 2015 13:44:21 -0300 Subject: [PATCH] Handles offline server again --- lib/exoshader.coffee | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/exoshader.coffee b/lib/exoshader.coffee index d7b041e..9f4fe91 100644 --- a/lib/exoshader.coffee +++ b/lib/exoshader.coffee @@ -51,8 +51,13 @@ module.exports = Exoshader = xhr.onreadystatechange = -> if xhr.readyState is 4 error = false - if xhr.status is 200 - this.daddy.checkServer() + if xhr.status is 200 + this.daddy.checkServer() + else + error=true + + if error + xhr.daddy.statusMessage.textContent = " SHADER: NOSRV :-(" xhr.open "GET", theUrl, true xhr.send();