From 5a8e4310d28fd8999934962589267ea0c3fc3387 Mon Sep 17 00:00:00 2001 From: David von Oheimb Date: Sat, 7 Apr 2018 12:02:25 +0200 Subject: [PATCH] replace the disabled error message on local file access by a (more appropriate) warning --- src/standalone/standalone.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/standalone/standalone.js b/src/standalone/standalone.js index 328cb733..57824a7a 100644 --- a/src/standalone/standalone.js +++ b/src/standalone/standalone.js @@ -98,11 +98,10 @@ function parseURLParameters() { viewer = pannellum.viewer('container', configFromURL); } -// Display error if opened from local file -if (false && window.location.protocol == 'file:') { - anError('Due to browser security restrictions, Pannellum can\'t be run ' + - 'from the local filesystem; some sort of web server must be used.'); -} else { - // Initialize viewer - parseURLParameters(); +// Give warning if opened from local file +if (window.location.protocol == 'file:') { + console.log('Due to browser security restrictions, loading Pannellum files from the local filesystem might not work;\n' + + 'Use the Chrome command-line option "--allow-file-access-from-files" or some sort of local web server.'); } +// Initialize viewer +parseURLParameters();