Explorar el Código

Editor: Simplified hash API.

Mr.doob hace 9 años
padre
commit
d164e7e999
Se han modificado 1 ficheros con 2 adiciones y 4 borrados
  1. 2 4
      editor/index.html

+ 2 - 4
editor/index.html

@@ -319,13 +319,11 @@
 
 			//
 
-			var file = null;
 			var hash = window.location.hash;
 
-			if ( hash.substr( 1, 4 ) === 'app=' ) file = hash.substr( 5 );
-			if ( hash.substr( 1, 6 ) === 'scene=' ) file = hash.substr( 7 );
+			if ( hash.substr( 1, 5 ) === 'file=' ) {
 
-			if ( file !== null ) {
+				var file = hash.substr( 6 );
 
 				if ( confirm( 'Any unsaved data will be lost. Are you sure?' ) ) {