Browse Source

Editor/App: Added edit button back.

Mr.doob 8 years ago
parent
commit
99c9c862dc
1 changed files with 22 additions and 0 deletions
  1. 22 0
      editor/js/libs/app/index.html

+ 22 - 0
editor/js/libs/app/index.html

@@ -13,6 +13,19 @@
 				margin: 0px;
 				margin: 0px;
 				overflow: hidden;
 				overflow: hidden;
 			}
 			}
+			#edit {
+				position: absolute;
+				bottom: 20px;
+				right: 20px;
+				padding: 8px;
+				text-decoration: none;
+				background-color: #fff;
+				color: #555;
+				opacity: 0.5;
+			}
+			#edit:hover {
+				opacity: 1;
+			}
 		</style>
 		</style>
 	</head>
 	</head>
 	<body ontouchstart="">
 	<body ontouchstart="">
@@ -35,6 +48,15 @@
 					player.setSize( window.innerWidth, window.innerHeight );
 					player.setSize( window.innerWidth, window.innerHeight );
 				} );
 				} );
 
 
+				if ( location.search === '?edit' ) {
+					var button = document.createElement( 'a' );
+					button.id = 'edit';
+					button.href = 'https://threejs.org/editor/#file=' + location.href.split( '/' ).slice( 0, - 1 ).join( '/' ) + '/app.json';
+					button.target = '_blank';
+					button.textContent = 'EDIT';
+					document.body.appendChild( button );
+				}
+
 			} );
 			} );
 
 
 		</script>
 		</script>