ParentPageEdit

The script is currently up for review and will not yet work when imported. Please remove this once it has been approved.

ParentPageEdit is a script that detects if a page is a subpage of another page and if so, adds two buttons to the edit button list to edit the base page and root page. The base page is one step above the subpage. For example, in the case of Mario/Appearances, this would be Mario, and in the case of Mario/Appearances/Canon, this would be Appearances. The root page is the highest pages from which all other pages originate. In both examples, this would be Mario, and it would still be Mario in the theoretical case of Mario/Appearances/Canon/Comics/1-40.

Installation
Paste this rule into a new line on your wiki's MediaWiki:ImportJS. dev:ParentPageEdit.js Alternatively, you can use one of the below codes in .js pages, although it is recommended against. You must also use these when importing for personal use.

Configuration
You can change the text of the buttons using the  and   proprties in a JavaScript file. If you have the script imported in that same file, the settings must be above the import, or else it will not work.

Replace "Test" and "This is a button" with whatever you desire. Don't forget to submit the JS for review after publishing.

In case you ever need the selectors, you can target them with  and