MediaWiki:SourceEditButton.js

//Classic-Edit Button (lightly modified version of Grunny's EditIntroButton) //Adds a button to the Edit Dropdown that allows the user to edit in source mode. Useful for users who have the default as Visual Editor. //Modified by Sophiedp to make it use source mode rather than the classic editor (see https://dev.wikia.com/wiki/Thread:17269) (function {   if ( (skin === 'oasis' || skin === 'wikia') && mw.config.get('wgNamespaceNumber') !== '-1' && mw.config.get('wgNamespaceNumber') !== '1201' && mw.config.get('wgNamespaceNumber') !== '2001' && !window.AddSectionButtonLoaded ) {       window.AddSectionButtonLoaded = true;        var link = 'Source Editor';        if ( (mw.config.get('wgNamespaceNumber') === '2' ||           mw.config.get('wgNamespaceNumber') === '3') && $('.UserProfileActionButton').length ) {           $('.UserProfileActionButton  > .wikia-menu-button > ul').append('' + link + '');        } else {            $('.page-header__contribution-buttons .wds-list').append('' + link + '');        }    } });