MediaWiki:AddSectionButton/code.js

// Add Section Button (lightly modified version of Grunny's EditIntroButton) /* If the button overlaps with the Edit button in Monobook, insert "a#ca-edit-newsection { display: none !important;}" to your personal Monobook CSS.

if ( wgNamespaceNumber != -1 && !window.AddSectionButtonLoaded ) { $( addAddSectionButton ); } var AddSectionButtonLoaded = true; function addAddSectionButton { var theText = 'Add section'; if ( typeof AddSectionButtonText == "string" ) { theText = AddSectionButtonText; }	switch( skin ) { case 'answers': case 'awesome': case 'monaco_old': case 'monaco': $('#page_controls > #control_edit').after(''+ theText + ''); break; case 'uncyclopedia': case 'wowwiki': case 'lostbook': case 'monobook': $('#p-cactions > .pBody > ul > #ca-edit').after(''+ theText + ''); break; case 'oasis': case 'wikia': $(( wgNamespaceNumber == 2 || wgNamespaceNumber == 3 ) && $( '.UserProfileActionButton' ).length ? '.UserProfileActionButton > .wikia-menu-button > ul' : '.page-header__contribution-buttons .wds-list').append(''+ theText + ''); break; } }