提交 8a0440fa 编写于 作者: M Mr.doob

Docs: Improved page titles.

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