MediaWiki:Monobook.js: Difference between revisions

hmm
(now that we just defined MonobookSidebar, we should be able to initialize it too)
(hmm)
Line 162: Line 162:
var a = document.createElement( 'a' );
var a = document.createElement( 'a' );
if ( article.length > 7 && article.substr( 0, 7 ) == 'http://' ) {
if ( article.length > 7 && article.substr( 0, 7 ) == 'http://' ) {
a.setAttribute( 'href', article );
if ( wgUserName == 'Jack Phoenix' ) { // test code
a.setAttribute( 'href', decodeURI( article ) );
} else {
a.setAttribute( 'href', article );
} // test code end
} else {
} else {
article = encodeURIComponent( article.replace( MonobookSidebar.re_s, '_' ) );
article = encodeURIComponent( article.replace( MonobookSidebar.re_s, '_' ) );