未验证 提交 f3eb5138 编写于 作者: A AntoineC 提交者: GitHub

Replace string literal with string concatenation

上级 54a1e789
......@@ -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 );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册