Skip to content

Commit ee9b5a1

Browse files
committed
Merge pull request #3 from AVGP/master
Fixed demo, because wikipedia screwed me over
2 parents 0a32842 + 5ef3bf4 commit ee9b5a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ <h1>Terminal.js Demo</h1>
5151
var xhr = new XMLHttpRequest();
5252
xhr.open("get", "http://cors.io/en.wikipedia.org/w/api.php?format=xml&action=parse&page=" + args.join(" "), false);
5353
xhr.send();
54-
if(xhr.status !== 200) return "<p style=\"color: red\">Failed :(</p>";
54+
if(xhr.status !== 200 || xhr.responseXML.querySelector("text")) return "<p style=\"color: red\">Failed :(</p>";
5555
return xhr.responseXML.querySelector("text").textContent;
5656
};
5757

0 commit comments

Comments
 (0)