Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Gadget-test.js: Difference between revisions

MediaWiki interface page
More languages
m (Hiding element)
m (Discarded idea – it takes too long to hide the objects. Because JavaScript loads after the page was loaded)
 
Line 1: Line 1:
$(function() {
$(function() {
if (mw.config.get('wgPageName') == 'Special:ConfirmAccounts/authors') {
if (mw.config.get('wgUserGroups').includes('sysop')) {
if (mw.config.get('wgUserGroups').includes('sysop')) {
console.log("You are a sysop on ProleWiki. Congratulations!")
var emailprovider = $(".mw-confirmaccount-body-0 tr:nth-child(2) td:nth-child(2) strong")[0].previousSibling.nodeValue.split("@")[1];
console.log("A courtesy of MediaWiki:Gadget-test.js")
$(".mw-confirmaccount-body-0 tr:nth-child(2) td:nth-child(2) strong")[0].previousSibling.nodeValue = "(hidden)" + emailprovider;
}
}
}
});
});

Latest revision as of 09:21, 7 January 2024

$(function() {
	if (mw.config.get('wgUserGroups').includes('sysop')) {
		console.log("You are a sysop on ProleWiki. Congratulations!")
		console.log("A courtesy of MediaWiki:Gadget-test.js")
	}
});