File tree Expand file tree Collapse file tree 1 file changed +23
-5
lines changed
etc/typedoc/theme/assets/js Expand file tree Collapse file tree 1 file changed +23
-5
lines changed Original file line number Diff line number Diff line change 2727 * @returns {string } cleaned text
2828 */
2929 function cleanPath ( txt ) {
30+ var ch ;
3031 var j ;
31- if (
32- txt . charCodeAt ( 0 ) === 34 && // "
33- txt . charCodeAt ( txt . length - 1 ) === 34 // "
34- ) {
35- txt = txt . slice ( 1 , txt . length - 1 ) ;
32+ if ( txt . charCodeAt ( 0 ) === 34 ) {
33+ j = 1 ;
34+ for ( j = 1 ; j < txt . length ; j ++ ) {
35+ ch = txt . charCodeAt ( j ) ;
36+ if ( ch === 34 ) {
37+ txt = txt . slice ( 1 , j ) ;
38+ break ;
39+ }
40+ }
3641 }
3742 j = txt . indexOf ( '/docs/types/' ) ;
3843 if ( j >= 0 ) {
4651 return txt ;
4752 }
4853
54+ /**
55+ * Cleans up the document title.
56+ *
57+ * @private
58+ * @param {DOMElement } el - title element
59+ */
60+ function cleanTitle ( el ) {
61+ el . innerHTML = cleanPath ( el . innerHTML ) + ' | stdlib' ;
62+ }
63+
4964 /**
5065 * Cleans up link text.
5166 *
129144 function main ( ) {
130145 var el ;
131146
147+ el = document . querySelector ( 'title' ) ;
148+ cleanTitle ( el ) ;
149+
132150 el = document . querySelectorAll ( '.tsd-kind-external-module a' ) ;
133151 cleanLinks ( el ) ;
134152
You can’t perform that action at this time.
0 commit comments