Content deleted Content added
rm some code, adding cats |
m Maintenance: Replacing addOnloadHook with native jQuery (mw:ResourceLoader/Migration_guide_(users)#addOnloadHook - phab:T130879) |
||
(22 intermediate revisions by 2 users not shown) | |||
Line 12:
{
return;
}
var insertBeforeThis = document.getElementById("wpSummary").nextSibling;▼
if(insertBeforeThis.className != "editCheckboxes")
{
return;
}
Line 19 ⟶ 25:
var dropdown = document.createElement("select");
dropdown.style.width = "38%";
dropdown.style.margin = "0px 4px 0px 0px";
dropdown.onchange = new Function("editsummOnCannedSummarySelected()");
var minorDropdown = document.createElement("select");
editsummAddCatToDropdown(dropdown,"Choose a Default Edit Summary");▼
minorDropdown.style.width = "38%";
minorDropdown.onchange = new Function("editsummOnCannedSummarySelected()");
▲ editsummAddCatToDropdown(
editsummAddOptionToDropdown(
editsummAddOptionToDropdown(
editsummAddOptionToDropdown(
editsummAddOptionToDropdown(
editsummAddOptionToDropdown(
if (mw.config.get('wgNamespaceNumber') == 0)
{
editsummAddOptionToDropdown(dropdown,"
editsummAddOptionToDropdown(dropdown,"
editsummAddOptionToDropdown(dropdown,"
editsummAddOptionToDropdown(dropdown,"
editsummAddOptionToDropdown(dropdown,"
editsummAddOptionToDropdown(dropdown,"
editsummAddOptionToDropdown(dropdown,"
editsummAddOptionToDropdown(dropdown,"
} else
{
editsummAddOptionToDropdown(dropdown,"
editsummAddOptionToDropdown(dropdown,"
if ((mw.config.get('wgNamespaceNumber') % 2 != 0) & (mw.config.get('wgNamespaceNumber') != 3))
{
editsummAddOptionToDropdown(dropdown,"
editsummAddOptionToDropdown(dropdown,"
}
}
▲ var insertBeforeThis = document.getElementById("wpSummary").nextSibling;
var theParent = insertBeforeThis.parentNode;
theParent.insertBefore(dropdown,insertBeforeThis);
theParent.insertBefore(minorDropdown,insertBeforeThis);
theParent.insertBefore(document.createElement("br"),dropdown);
Line 74 ⟶ 84:
var option = document.createElement("option");
option.disabled = "disabled"
var optionTextNode = document.createTextNode(
option.appendChild(optionTextNode);
dropdown.appendChild(option);
Line 94 ⟶ 104:
}
editsummInitialize ();
|