MediaWiki:EditIntroButton/code.js

// /* * Adds a button next to the regular edit button which acts as a "section edit" button for the intro * Written by Grunny (http://www.wikia.com/wiki/User:Grunny) * Uses PurgeButton/code.js as a basis for jQuery layout * */ if ( wgNamespaceNumber != -1 && !window.EditIntroButtonLoaded ) { addOnloadHook( addEditIntroButton ); }

var EditIntroButtonLoaded = true;

function addEditIntroButton { var theText = 'Edit intro'; if ( typeof EditIntroButtonText == "string" ) { theText = EditIntroButtonText; }

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;

} } //