diff --git a/js/rpg_core/Utils.js b/js/rpg_core/Utils.js index ccfda839..c512b410 100644 --- a/js/rpg_core/Utils.js +++ b/js/rpg_core/Utils.js @@ -99,27 +99,6 @@ Utils.isAndroidChrome = function() { return !!(agent.match(/Android/) && agent.match(/Chrome/)); }; -/** - * Checks whether the browser can read files in the game folder. - * - * @static - * @method canReadGameFiles - * @return {Boolean} True if the browser can read files in the game folder - */ -Utils.canReadGameFiles = function() { - var scripts = document.getElementsByTagName('script'); - var lastScript = scripts[scripts.length - 1]; - var xhr = new XMLHttpRequest(); - try { - xhr.open('GET', lastScript.src); - xhr.overrideMimeType('text/javascript'); - xhr.send(); - return true; - } catch (e) { - return false; - } -}; - /** * Makes a CSS color string from RGB values. * diff --git a/js/rpg_managers/SceneManager.js b/js/rpg_managers/SceneManager.js index 5b1f13ce..618f052c 100644 --- a/js/rpg_managers/SceneManager.js +++ b/js/rpg_managers/SceneManager.js @@ -45,7 +45,6 @@ SceneManager.run = function(sceneClass) { SceneManager.initialize = function() { this.initProgressWatcher(); this.initGraphics(); - this.checkFileAccess(); this.initAudio(); this.initInput(); this.initNwjs(); @@ -91,12 +90,6 @@ SceneManager.checkWebGL = function() { } }; -SceneManager.checkFileAccess = function() { - if (!Utils.canReadGameFiles()) { - throw new Error('Your browser does not allow to read local files.'); - } -}; - SceneManager.initAudio = function() { var noAudio = Utils.isOptionValid('noaudio'); if (!WebAudio.initialize(noAudio) && !noAudio) {