User:Tark/common.js: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
mNo edit summary
Line 199: Line 199:
// Begin Clean delete reasons
// Begin Clean delete reasons
// Adapted from https://www.mediawiki.org/wiki/MediaWiki:Gadget-CleanDeleteReasons.js
// Adapted from https://www.mediawiki.org/wiki/MediaWiki:Gadget-CleanDeleteReasons.js
// if (mw.config.get("wgAction") == "delete") {
if (mw.config.get("wgAction") == "delete") {
//     var wpReason = document.getElementById("wpReason");
     var wpReason = document.getElementById("wpReason");
//     if (wpReason) {
     if (wpReason) {
//         var regexp = /(content was|page was empty)/i;
         var regexp = /(content was|page was empty)/i;
//         if (regexp.test(wpReason.value)) {
         if (regexp.test(wpReason.value)) {
//             wpReason.value = "";
             wpReason.value = "";
//         }
         }
//     }
     }
// }
}
// End Clean delete reasons
// End Clean delete reasons


Line 216: Line 216:
         mw.util.wikiScript() + "?" + $.param({ title: mw.config.get("wgPageName"), action: "delete" }),
         mw.util.wikiScript() + "?" + $.param({ title: mw.config.get("wgPageName"), action: "delete" }),
         mw.config.get("skin") === "vector" ? "Deleto" : "*",
         mw.config.get("skin") === "vector" ? "Deleto" : "*",
         "ca-purge",
         "ca-delete",
         "Purge the server cache of this page",
         "Deleto!!!!",
         "*"
         "*"
     );
     );
}
}
// End Delete link
// End Delete link
// Stat Wiki Stats link
if (!mw.config.get("wgPageName").includes("User")) {
var ss = document.getElementById("siteSub");
    ss.innerHTML = "Links: <span><a href=\"https://staging-wikistats.espacore.de/article/portal/" + mw.config.get("wgPageName") + "\">Wiki Stats</a></span>";
    ss.style.display = "block";
}
// End Wiki Stats link

Navigation menu