2
0
Эх сурвалжийг харах

patch_to_a_way_to_a_scripts_with_an_Syntax_highlighting

alexan0308 10 жил өмнө
parent
commit
cc3946f05d
1 өөрчлөгдсөн 3 нэмэгдсэн , 3 устгасан
  1. 3 3
      docs/page.js

+ 3 - 3
docs/page.js

@@ -62,18 +62,18 @@ var onDocumentLoad = function ( event ) {
 	// Syntax highlighting
 
 	var styleBase = document.createElement( 'link' );
-	styleBase.href = '../../prettify/prettify.css';
+	styleBase.href = pathname.substring( 0, pathname.indexOf( 'docs' ) + 4 ) + '/prettify/prettify.css';
 	styleBase.rel = 'stylesheet';
 
 	var styleCustom = document.createElement( 'link' );
-	styleCustom.href = '../../prettify/threejs.css';
+	styleCustom.href = pathname.substring( 0, pathname.indexOf( 'docs' ) + 4 ) + '/prettify/threejs.css';
 	styleCustom.rel = 'stylesheet';
 
 	document.head.appendChild( styleBase );
 	document.head.appendChild( styleCustom );
 
 	var prettify = document.createElement( 'script' );
-	prettify.src = '../../prettify/prettify.js';
+	prettify.src = pathname.substring( 0, pathname.indexOf( 'docs' ) + 4 ) + '/prettify/prettify.js';
 
 	prettify.onload = function () {