MediaWiki:Monobook.js: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 160: Line 160:
}
}
article = encodeURIComponent( article.replace( MonobookSidebar.re_s, '_' ) );
article = encodeURIComponent( article.replace( MonobookSidebar.re_s, '_' ) );
if(wgUserName=='Jack Phoenix')console.log('MonobookSidebar: article is' + article);
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://' ) {
if ( wgUserName == 'Jack Phoenix' ) { // test code
a.setAttribute( 'href', article );
a.setAttribute( 'href', decodeURIcomponent( 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, '_' ) );