User:Chaotic Enby/Unblock wizard.js: Difference between revisions

From Test Wiki
Content deleted Content added
trying again
a lot of this code is really just monkey see monkey do, and me copy-pasting things wherever it's plausible
Line 65: Line 65:
"editsummary-main": "Submitting using [[User:Chaotic Enby/Unblock wizard]]",
"editsummary-main": "Submitting using [[User:Chaotic Enby/Unblock wizard]]",
"status-redirecting": "Submission succeeded. Redirecting you to your talk page ...",
"status-redirecting": "Submission succeeded. Redirecting you to your talk page ...",
"status-redirecting-utrs": "Submission succeeded. Redirecting you to UTRS ...",
"captcha-label": "Please enter the letters appearing in the box below",
"captcha-label": "Please enter the letters appearing in the box below",
"captcha-placeholder": "Enter the letters here",
"captcha-placeholder": "Enter the letters here",
Line 355: Line 356:
if (blockType == "IP_hardblock") {
if (blockType == "IP_hardblock") {
setMainStatus('success', msg('status-redirecting'));
setMainStatus('success', msg('status-redirecting-utrs'));
mw.track('counter.gadget_afcsw.submit_succeeded');
mw.track('counter.gadget_afcsw.submit_succeeded');
$(window).off('beforeunload', afc.beforeUnload);
location.href = "https://utrs-beta.wmflabs.org/public/appeal/account";
setTimeout(function () {
location.href = "https://utrs-beta.wmflabs.org/public/appeal/account";
}, config.redirectionDelay);
} else {
} else {
var userTalk = "User talk:" + mw.config.get('wgUserName');
var userTalk = "User talk:" + mw.config.get('wgUserName');