For site-wide use, an administrator can add the line below to the wiki's MediaWiki:ImportJS page.
dev:User Rights Reasons Dropdown/code.js
For personal use, add the code snippet below to your global.js page (for use on all wikis) or your common.js page on your wiki (for use on a single wiki). Note that personal JS must be enabled for your account.
articles:['u:dev:User Rights Reasons Dropdown/code.js',]});
Note: In this example, pay close attention to the placement of commas and other punctuation. For people who aren't familiar with programming (and even those who are!), a common mistake when writing code is to accidentally delete, forget, or misplace critical symbols like commas or quotation marks. This can cause a syntax error that breaks the code. Carefully follow the convention shown here when using importArticles.
Create MediaWiki:Custom-userrightsreasons with your reasons. Like MediaWiki:Ipbreason-dropdown (block reasons), you can add sections with one asterisk (*) and the reasons with two asterisks (**). For example:
** Lots of edits
** Requested - Bot
** Clean Up
The default reason is a null string. If you want to override the reason, add before the import function another line like this:
Using configuration options with FANDOM Open Source Library scripts