Forráskód Böngészése

Docs: Improved page titles.

Mr.doob 7 éve
szülő
commit
8a0440fa90
2 módosított fájl, 4 hozzáadás és 4 törlés
  1. 2 2
      docs/index.html
  2. 2 2
      docs/page.js

+ 2 - 2
docs/index.html

@@ -307,7 +307,7 @@
 				if(hash) {
 
 					iframe.src = splitHash[ 0 ] + '.html' + splitHash[ 1 ];
-					subtitle = ' - ' + titles[ splitHash[ 0 ] ] + splitHash[ 1 ];
+					subtitle = titles[ splitHash[ 0 ] ] + splitHash[ 1 ] + ' - ';
 
 				} else {
 
@@ -317,7 +317,7 @@
 				}
 
 				document.body.replaceChild( iframe, oldIframe );
-				document.title = 'three.js docs' + subtitle;
+				document.title = subtitle + 'three.js docs';
 
 			}
 

+ 2 - 2
docs/page.js

@@ -24,7 +24,7 @@ if ( !window.frameElement && window.location.protocol !== 'file:' ) {
 }
 
 
-var onDocumentLoad = function ( event ) {
+function onDocumentLoad( event ) {
 
 	var path;
 	var pathname = window.location.pathname;
@@ -69,7 +69,7 @@ var onDocumentLoad = function ( event ) {
 	text = text.replace( /\[example:([\w\_]+)\]/gi, "[example:$1 $1]" ); // [example:name] to [example:name title]
 	text = text.replace( /\[example:([\w\_]+) ([\w\:\/\.\-\_ \s]+)\]/gi, "<a href=\"../examples/#$1\"  target=\"_blank\">$2</a>" ); // [example:name title]
 
-	
+
 	document.body.innerHTML = text;
 
 	// handle code snippets formatting