diff options
Diffstat (limited to 'src/flashrunner.js')
-rw-r--r-- | src/flashrunner.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/flashrunner.js b/src/flashrunner.js index 65f9bdb..8f95449 100644 --- a/src/flashrunner.js +++ b/src/flashrunner.js @@ -45,8 +45,8 @@ function open_url( runner_url ){ if ( !runner_url.endsWith('.swf') ) throw new Error( 'Invalid swf file link or location' ); if ( runner_url.startsWith('file:///') ){ - if ( !r_fsys.existsSync(runner_url.replace('file:///', '')) ) - throw new Error( 'File doesn\'t exist' ); + if ( !r_fsys.existsSync(runner_url.replace('file:///', '')) ) + throw new Error( 'File doesn\'t exist' ); } if ( runner_url[runner_url.indexOf('.swf') + 4] === undefined ){ set_container_content( runner_url ); @@ -166,10 +166,10 @@ document.getElementById( 'menu_about' ).addEventListener( 'click', function(){ document.getElementById( 'modal_run_btn' ).addEventListener( 'click', function(){ if ( document.getElementById('flash_file').value !== undefined && document.getElementById('flash_file').value !== null && document.getElementById('flash_file').value !== '' ){ - if ( document.getElementById('flash_file').value.startsWith('http://') || document.getElementById('flash_file').value.startsWith('https://') ) - open_url( document.getElementById('flash_file').value ); - else - open_url( 'file:///' + document.getElementById('flash_file').value ); + if ( document.getElementById('flash_file').value.startsWith('http://') || document.getElementById('flash_file').value.startsWith('https://') ) + open_url( document.getElementById('flash_file').value ); + else + open_url( 'file:///' + document.getElementById('flash_file').value ); } else { |