User:Enterprisey/CustomSummaryPresets

CustomSummaryPresets
DescriptionCustom edit-summary dropdown underneath the text box
Author(s)Latest updates by User:Enterprisey
Forked from Equazcion's version
StatusFinished
UpdatedJuly 24, 2018; 5 years ago (2018-07-24)
Browser supportFirefox
Skin supportVector
SourceUser:Enterprisey/CustomSummaryPresets.js

A userscript that puts a dropdown of custom edit summaries underneath the edit summary box. Forked from Equazcion's script with the same name in July 2018.

Installation instructions edit

Hint: It's much easier if you get ScriptInstaller, then navigate to User:Enterprisey/CustomSummaryPresets.js and click "Install" at the top.

However, here's the manual method:

  1. Place {{subst:iusc|User:Enterprisey/CustomSummaryPresets.js}} on Special:MyPage/common.js or Special:MyPage/skin.js.
  2. Clear your cache and enjoy!

Usage edit

This script supports three ways of specifying custom edit summaries.

The traditional way: put these lines in your common.js after the importScript line that mentions CustomSummaryPresets:

var customsum1 = "My first custom edit summary";
var customsum2 = "My second custom edit summary";

And the next time you're on an edit page, the dropdown should have those two items in it. You can add customsum3 and so on, going up to customsum20. If you want more, use the next method.

The list way: put these lines in your common.js:

var customGeneralSummaries = [
"My first custom edit summary",
"My second custom edit summary",
];

The first and last lines (with the square brackets) are critical. You can specify as many summaries as you want this way.

The traditional and list ways conflict, so you have to pick one. The advanced way can be used with either.

The advanced way: put these lines in your common.js:

var customNamespaceSummaries = {
'0': [
"My first custom edit summary for articles only",
],
'2': [
"My second custom edit summary for user pages only",
],
};

Again, the symbols are crucial. You can specify as many summaries as you want. The numbers are namespace numbers; a full list is at WP:Namespaces. If you put a summary in the list for a namespace, it will only show up when you're editing a page in that namespace.

Credits edit

Recent code copied from the gadget (permalink for that version). I also looked at Equazicon's version (permalink for that version). Black Falcon pointed out that Equazicon's version was broken on the technical village pump, which is why I made this version.

See also edit