We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0a32842 + 5ef3bf4 commit ee9b5a1Copy full SHA for ee9b5a1
index.html
@@ -51,7 +51,7 @@ <h1>Terminal.js Demo</h1>
51
var xhr = new XMLHttpRequest();
52
xhr.open("get", "http://cors.io/en.wikipedia.org/w/api.php?format=xml&action=parse&page=" + args.join(" "), false);
53
xhr.send();
54
- if(xhr.status !== 200) return "<p style=\"color: red\">Failed :(</p>";
+ if(xhr.status !== 200 || xhr.responseXML.querySelector("text")) return "<p style=\"color: red\">Failed :(</p>";
55
return xhr.responseXML.querySelector("text").textContent;
56
};
57
0 commit comments