Minecraft Wiki
Register
Advertisement
This is the documentation page. It should be transcluded into the main script page. See Template:Documentation for more information

This script creates a menu of custom edit summaries to insert into a page, and a generic "rollback" summary. It also allows creation of custom headers for the summaries.

Place the following in your common.js page or skin script page to use:

if (mw.config.get( 'wgAction' ) === 'edit' || mw.config.get( 'wgAction' ) === 'submit') {
   var customSummaries = [
       'An edit summary preset',
       'Another edit summary preset',
       '== A header',
       'A third preset [' + '[a wiki link]]'
   ];
   mw.loader.load( 'User:KnightMiner/editSummaryPresets.js' );
}

Headers are created by prefixing a summary with == . The script supports virtually unlimited summaries and headers.

The extra single quotes and plus sign on the link is to prevent the wiki software from creating a link as the variables are loaded. This normally happens with templates being transcluded or substituted in scripts, so the single quotes and plus may not be needed.

Sources: This is a modified version of User:Kanegasi/editsummarypresets.js so you may add custom headers, and to contain the generic "rollback" summary. That script used code from the following scripts:



Advertisement