From e38d74471caa2cffba758946e50c88097c7329e9 Mon Sep 17 00:00:00 2001 From: nightwing Date: Thu, 11 May 2017 23:32:30 +0400 Subject: [PATCH] improve gh-pages of c9/core --- plugins/c9.ide.language/complete_util.js | 3 +- .../c9.vfs.standalone/www/ide.offline.html | 59 +++++++++++++++---- scripts/makestandalone.sh | 6 +- 3 files changed, 56 insertions(+), 12 deletions(-) diff --git a/plugins/c9.ide.language/complete_util.js b/plugins/c9.ide.language/complete_util.js index cb05d47b..394a5c04 100644 --- a/plugins/c9.ide.language/complete_util.js +++ b/plugins/c9.ide.language/complete_util.js @@ -94,7 +94,8 @@ function fetchText(path, callback) { xhr.onload = function (e) { if (xhr.readyState !== 4) return; - if (xhr.status !== 200) + // loading from file:// returns 0 + if (xhr.status !== 200 && xhr.status !== 0) return done(new Error(xhr.statusText)); done(null, xhr.responseText); }; diff --git a/plugins/c9.vfs.standalone/www/ide.offline.html b/plugins/c9.vfs.standalone/www/ide.offline.html index d63bb9e7..18d7dc92 100644 --- a/plugins/c9.vfs.standalone/www/ide.offline.html +++ b/plugins/c9.vfs.standalone/www/ide.offline.html @@ -38,8 +38,14 @@ document.body.className = document.body.className.replace("loading " + loadingIde.className, ""); }; + + + +