diff options
author | prathamesh | 2017-08-31 16:28:57 +0530 |
---|---|---|
committer | prathamesh | 2017-09-01 15:45:06 +0530 |
commit | 3d9bce5471d04bf50e03155d3cd67bdae44a4fcc (patch) | |
tree | 8e4eb5f574754b28bf2fcb441f085155c3eaa0af /yaksh/static | |
parent | 055d0d1c51f90b4496a096a13bab5e4978fe9b92 (diff) | |
download | online_test-3d9bce5471d04bf50e03155d3cd67bdae44a4fcc.tar.gz online_test-3d9bce5471d04bf50e03155d3cd67bdae44a4fcc.tar.bz2 online_test-3d9bce5471d04bf50e03155d3cd67bdae44a4fcc.zip |
updated travis config and added print to debug on travis
Diffstat (limited to 'yaksh/static')
-rw-r--r-- | yaksh/static/yaksh/js/requesthandler.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/yaksh/static/yaksh/js/requesthandler.js b/yaksh/static/yaksh/js/requesthandler.js index c5629ab..39114e7 100644 --- a/yaksh/static/yaksh/js/requesthandler.js +++ b/yaksh/static/yaksh/js/requesthandler.js @@ -53,13 +53,13 @@ function get_result(uid){ dataType: "html", // Your server can response html, json, xml format. success: function(data, status, xhr) { content_type = xhr.getResponseHeader("content-type"); - if(content_type.includes("text/html")) { + if(content_type.indexOf("text/html") !== -1) { clearInterval(checker); unlock_screen(); document.open(); document.write(data); document.close(); - } else if(content_type.includes("application/json")) { + } else if(content_type.indexOf("application/json") !== -1) { res = JSON.parse(data); request_status = res.status; check_state(request_status, uid); @@ -116,7 +116,7 @@ $(document).ready(function(){ global_editor.editor.clearHistory(); } $('#code').submit(function(e) { - checker = setInterval(check_lock_screen, 30000); + checker = setInterval(check_lock_screen, 20000); lock_screen(); $.ajax({ type: 'POST', @@ -125,7 +125,7 @@ $(document).ready(function(){ dataType: "html", // Your server can response html, json, xml format. success: function(data, status, xhr) { content_type = xhr.getResponseHeader("content-type"); - if(content_type.includes("text/html")) { + if(content_type.indexOf("text/html") !== -1) { request_status = "initial" count = 0; clearInterval(checker); @@ -133,7 +133,7 @@ $(document).ready(function(){ document.open(); document.write(data); document.close(); - } else if(content_type.includes("application/json")) { + } else if(content_type.indexOf("application/json") !== -1) { res = JSON.parse(data); var uid = res.uid; request_status = res.state; |