Browse Source

Merge pull request #13301 from aecz/patch-1

Editor: Replace string literal with string concatenation
Mr.doob 7 years ago
parent
commit
6c7c0399e9
1 changed files with 7 additions and 9 deletions
  1. 7 9
      editor/js/Menubar.File.js

+ 7 - 9
editor/js/Menubar.File.js

@@ -295,15 +295,13 @@ Menubar.File = function ( editor ) {
 
 			if ( config.getKey( 'project/editable' ) ) {
 
-				editButton = `
-			var button = document.createElement( 'a' );
-			button.href = 'https://threejs.org/editor/#file=' + location.href.split( '/' ).slice( 0, - 1 ).join( '/' ) + '/app.json';
-			button.style.cssText = 'position: absolute; bottom: 20px; right: 20px; padding: 12px 14px; color: #fff; border: 1px solid #fff; border-radius: 4px; text-decoration: none;';
-			button.target = '_blank';
-			button.textContent = 'EDIT';
-			document.body.appendChild( button );
-				`;
-
+				editButton =
+			  		"var button = document.createElement( 'a' );" +
+					  "button.href = 'https://threejs.org/editor/#file=' + location.href.split( '/' ).slice( 0, - 1 ).join( '/' ) + '/app.json';" +
+					  "button.style.cssText = 'position: absolute; bottom: 20px; right: 20px; padding: 12px 14px; color: #fff; border: 1px solid #fff; border-radius: 4px; text-decoration: none;';" +
+					  "button.target = '_blank';" +
+					  "button.textContent = 'EDIT';" +
+					  "document.body.appendChild( button );";
 			}
 
 			content = content.replace( '/* edit button */', editButton );