Skip to content

Commit

Permalink
replace the disabled error message on local file access by a (more ap…
Browse files Browse the repository at this point in the history
…propriate) warning
  • Loading branch information
DDvO committed Apr 7, 2018
1 parent e77d0ea commit f816411
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/standalone/standalone.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

0 comments on commit f816411

Please sign in to comment.