Преглед на файлове

Merge pull request #5383 from alexan0308/highlighting

Patch to a way to a scripts with an Syntax highlighting
Mr.doob преди 10 години
родител
ревизия
9c1e9b911b
променени са 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 () {