MediaWiki:ParentPageEdit.js

// Thanks to KockaAdmiralac and DuckeyD for their assistance on making this script

if ($('.page-header__page-subtitle').length > 0) { $('.page-header__contribution-buttons .wds-list').append(       $('').append( $('', {               href: mw.util.getUrl(mw.config.get('wgPageName').match(/(.*)\//)[1], {action: 'edit'}),                text: window.EditBasePageText || 'Edit base page',                id: 'edit-basepage'            }) ),       $('').append( $('', {               href: mw.util.getUrl(mw.config.get('wgPageName').match(/(.*?)\//)[1], {action: 'edit'}),                text: window.EditRootPageText || 'Edit root page',                id: 'edit-rootpage'            }) )   ); }