User:ErrantX/defaultsummaries.js: Difference between revisions

Content deleted Content added
insert
m Maintenance: Replacing addOnloadHook with native jQuery (mw:ResourceLoader/Migration_guide_(users)#addOnloadHook - phab:T130879)
 
(6 intermediate revisions by 2 users not shown)
Line 25:
 
var dropdown = document.createElement("select");
dropdown.style.width = "5038%";
dropdown.style.margin = "0px 4px 0px 0px";
dropdown.onchange = new Function("editsummOnCannedSummarySelected()");
 
var minorDropdown = document.createElement("select");
minorDropdown.style.width = "5038%";
minorDropdown.onchange = new Function("editsummOnCannedSummarySelected()");
 
editsummAddOptionToDropdowneditsummAddCatToDropdown(minorDropdown,"Common minor edit summaries - click to use");
editsummAddOptionToDropdowneditsummAddCatToDropdown(dropdown,"Common edit summaries - click to use");
 
editsummAddOptionToDropdown(dropdownminorDropdown,"Spelling/grammar correction");
editsummAddOptionToDropdown(dropdownminorDropdown,"Fixing style/layout errors");
editsummAddOptionToDropdown(dropdownminorDropdown,"[[Help:Reverting|Reverting]] [[Wikipedia:Vandalism|Vandalism]] or test edit");
editsummAddOptionToDropdown(dropdownminorDropdown,"[[Help:Reverting|Reverting]] unexplained content removal");
editsummAddOptionToDropdown(dropdownminorDropdown,"Copyedit (minor)");
if (mw.config.get('wgNamespaceNumber') == 0)
{
editsummAddCatToDropdown(dropdown,"Minor edits");
editsummAddOptionToDropdown(dropdown,"Spelling/grammar correction");
editsummAddOptionToDropdown(dropdown,"Fixing style/layout errors");
editsummAddOptionToDropdown(dropdown,"[[Help:Reverting|Reverting]] [[Wikipedia:Vandalism|Vandalism]] or test edit");
editsummAddOptionToDropdown(dropdown,"[[Help:Reverting|Reverting]] unexplained content removal");
editsummAddOptionToDropdown(dropdown,"Copyedit (minor)");
 
editsummAddCatToDropdown(dropdown,"Non-minor edits - add details if possible");
editsummAddOptionToDropdown(dropdown,"Expanding article");
editsummAddOptionToDropdown(dropdown,"Adding/improving reference(s)");
Line 54 ⟶ 53:
editsummAddOptionToDropdown(dropdown,"Copyedit (major)");
} else
{
editsummAddCatToDropdown(dropdown,"Talk Pages");
editsummAddOptionToDropdown(dropdown,"Reply");
editsummAddOptionToDropdown(dropdown,"Comment");
if ((mw.config.get('wgNamespaceNumber') % 2 != 0) & (mw.config.get('wgNamespaceNumber') != 3))
{
editsummAddOptionToDropdown(dropdown,"[[Wikipedia:WikiProject|WikiProject]] tagging");
editsummAddOptionToDropdown(dropdown,"[[Wikipedia:WikiProject|WikiProject]] assessment");
}
}
 
Line 103 ⟶ 104:
}
 
addOnloadHook$(function (){
editsummInitialize ();