User:Chaotic Enby/Unblock wizard.js: Difference between revisions
From Test Wiki
Content deleted Content added
Chaotic Enby (talk | contribs) more tests |
Chaotic Enby (talk | contribs) yeah |
||
| (3 intermediate revisions by the same user not shown) | |||
| Line 29: | Line 29: | ||
var demoMode = !!mw.util.getParamValue("demoMode"); |
var demoMode = !!mw.util.getParamValue("demoMode"); |
||
var usernameBlock = mw.util.getParamValue("usernameBlock"); |
var usernameBlock = mw.util.getParamValue("usernameBlock"); |
||
console.log("console.log"); |
|||
await new mw.Api().loadMessagesIfMissing(['wikimedia-copyrightwarning', 'copyrightwarning']); |
await new mw.Api().loadMessagesIfMissing(['wikimedia-copyrightwarning', 'copyrightwarning']); |
||
console.log("awawawait"); |
|||
// TODO: move to a separate JSON subpage, would be feasible once [[phab:T198758]] is resolved |
// TODO: move to a separate JSON subpage, would be feasible once [[phab:T198758]] is resolved |
||
var messages = { |
var messages = { |
||
| Line 72: | Line 72: | ||
"copyright-notice": `<small>${mw.message('wikimedia-copyrightwarning').plain()}</small>`, |
"copyright-notice": `<small>${mw.message('wikimedia-copyrightwarning').plain()}</small>`, |
||
}; |
}; |
||
console.log("aaaaa"); |
|||
var messagesCache = {}; |
var messagesCache = {}; |
||
| Line 91: | Line 92: | ||
var emptyFieldsWarned = false; |
var emptyFieldsWarned = false; |
||
var mainPosition = -1; |
var mainPosition = -1; |
||
console.log("yeah"); |
|||
async function parseAndCacheMsg(key, ...messageArgs) { |
async function parseAndCacheMsg(key, ...messageArgs) { |
||
| Line 661: | Line 664: | ||
} |
} |
||
console.log("await $$$"); |
|||
await $.when( |
await $.when( |
||
$.ready, |
$.ready, |
||
| Line 669: | Line 672: | ||
]) |
]) |
||
); |
); |
||
console.log("im rich now"); |
|||
if (!(mw.config.get('wgPageName').includes('Wikipedia:Unblock_wizard/')) || |
if ((!(mw.config.get('wgPageName').includes('Wikipedia:Unblock_wizard/')) && !(mw.config.get('wgPageName').includes('Chaotic_Enby/'))) || |
||
mw.config.get('wgAction') !== 'view') { |
mw.config.get('wgAction') !== 'view') { |
||
return; |
return; |
||
} |
} |
||
console.log("innit"); |
|||
init(); |
init(); |
||