Просмотр исходного кода

Manual: Fix links in material table. (#33487)

Michael Herzog 2 месяцев назад
Родитель
Сommit
24833e0d86
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      manual/resources/threejs-material-table.js

+ 4 - 2
manual/resources/threejs-material-table.js

@@ -243,7 +243,8 @@ const thead = addElem( 'thead', table );
 
 		const td = addElem( 'td', thead );
 		const a = addElem( 'a', td, material.shortName );
-		a.href = `https://threejs.org/docs/#api/materials/${material.name}`;
+		a.href = `https://threejs.org/docs/#${material.name}`;
+		a.target = '_blank';
 
 	} );
 
@@ -258,7 +259,8 @@ Array.from( allProperties ).sort().forEach( ( property ) => {
 		const hasProperty = material.properties.indexOf( property ) >= 0;
 		const td = addElem( 'td', tr );
 		const a = addElem( 'a', td, hasProperty ? '•' : '' );
-		a.href = `https://threejs.org/docs/#api/materials/${material.name}.${property}`;
+		a.href = `https://threejs.org/docs/#${material.name}.${property}`;
+		a.target = '_blank';
 
 	} );
 

粤ICP备19079148号