diff --git a/lib/bootstraplesson.js b/lib/bootstraplesson.js index aeef4d30b5b..02839214e97 100644 --- a/lib/bootstraplesson.js +++ b/lib/bootstraplesson.js @@ -1,11 +1,12 @@ /******************************************* * IDENTIFY OLD VERSIONS *******************************************/ - function UrlExists(url) { + function UrlExists(url) { var http = new XMLHttpRequest(); http.open('HEAD', url, false); // TODO: change this to 'true' and use a promise to render the out of date banner http.send(); - return (http.status !== 404) + console.log('checking for', url, 'status is', http.status) + return (http.status == 200) } function isNewest() { @@ -34,6 +35,7 @@ } } + /******************************************* * ATTACH OPEN/CLOSE EVENTS TO LESSON SIDEBAR *******************************************/