diff --git a/www/js/init.js b/www/js/init.js index 6aec16c6..b2781d3a 100644 --- a/www/js/init.js +++ b/www/js/init.js @@ -28,7 +28,7 @@ params['version'] = "0.9.9.82 Beta-dev"; //DEV: do not set this dynamically -- i params['packagedFile'] = "wikipedia_en_ray_charles_novid_2018-10.zim"; //For packaged Kiwix JS (e.g. with Wikivoyage file), set this to the filename (for split files, give the first chunk *.zimaa) and place file(s) in default storage params['fileVersion'] = "wikipedia_en_ray_charles_novid_2018-10.zim (12-Oct-2018)"; //Use generic name for actual file, and give version here params['cachedStartPage'] = false; //If you have cached the start page for quick start, give its URI here -params['kiwixDownloadLink'] = "http://download.kiwix.org/zim/"; //Include final slash +params['kiwixDownloadLink'] = "https://download.kiwix.org/zim/"; //Include final slash params['results'] = params['results'] || 15; //Number of search results to display params['relativeFontSize'] = ~~(getCookie('relativeFontSize') || 100); //Sets the initial font size for articles (as a percentage) - user can adjust using zoom buttons diff --git a/www/js/lib/kiwixServe.js b/www/js/lib/kiwixServe.js index 8b9c925a..41484d2f 100644 --- a/www/js/lib/kiwixServe.js +++ b/www/js/lib/kiwixServe.js @@ -352,7 +352,9 @@ define([], function () { var xhttpTimeout = setTimeout(ajaxTimeout, 20000); function ajaxTimeout() { xhttp.abort(); - document.getElementById('serverResponse').innerHTML = "Connection attempt timed out (failed)"; + var responseMessageBox = document.getElementById('serverResponse'); + responseMessageBox.innerHTML = "Connection attempt timed out (failed)"; + if (/https?:|file:/.test(window.location.protocol)) responseMessageBox.innerHTML = "Browser's CORS Policy disallowed access!"; document.getElementById('serverResponse').style.display = "inline"; serverError(); return;