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

Content deleted Content added
tested, and should be working perfectly now
Add support for Vector 2022 (https://www.mediawiki.org/wiki/Talk:Reading/Web/Desktop_Improvements#c-Nathanielcwm-2022-07-06T13:14:00.000Z-Replace_the_%22new_section%22_tab_text_with_%22+%22_gadget_not_working.)
 
(9 intermediate revisions by 5 users not shown)
Line 5:
// ** **
// **********************************************************************
addOnloadHook$( function () {
var tab, =tablink, document.getElementById('ca-addsection')skin;
if(!tab) return;
var tablink = tab.getElementsByTagName('a')[0];
if(!tablink) return;
tablink.firstChild.nodeValue = '+';
 
var addSectionTabtab = document.getElementById("'ca-addsection"');
if (addSectionTab && addSectionTab !=tab null) {
{ return;
}
plusLink = addSectionTab.firstChild;
 
plusLink.style.paddingLeft = ".4em";
skin = plusLinkmw.styleconfig.paddingRightget( ='skin' ".4em");
var tablink = tab.getElementsByTagName( skin === 'vector' || skin === 'vector-2022' ? 'span' : 'a' )[0];
if ( !tablink ) return;{
if(!tab) return;
}
 
tablink.firstChild.nodeValue = '+';
if ( skin === 'monobook' ) {
plusLinktablink.style.paddingLeft = ".4em";
tablink.style.paddingRight = ".4em";
}
});