MediaWiki:Gadget-addsection-plus.js: Difference between revisions

Content deleted Content added
$(document).ready( → $(
fix for recent change to Vector, which now wraps text within nav links with a <span>
Line 6:
// **********************************************************************
$( function () {
var tab, tablink, skin;
 
tab = document.getElementById('ca-addsection');
Line 13:
}
 
skin = mw.config.get( 'skin' );
tablink = tab.getElementsByTagName( skin === 'vector' ? 'span' : 'a' )[0];
if ( !tablink ) {
return;
Line 19 ⟶ 20:
 
tablink.firstChild.nodeValue = '+';
if ( mw.config.get( 'skin' ) === 'monobook' ) {
tablink.style.paddingLeft = ".4em";
tablink.style.paddingRight = ".4em";