Jump to content

User:Chenzw/quickblock.js

From Simple English Wikipedia, the free encyclopedia

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
// ======== QuickBlocks =======
// [[m:MediaWiki:Gadget-blockoptions.js]]
function QuickBlock (expiry,reason,anonOnly,autoBlock,accountCreationBlocked,disableEmail,watch,disableUserTalk) {
$('#mw-input-wpExpiry-other').value=expiry;
$('#mw-input-wpReason-other').value=reason;
$('#mw-input-wpCreateAccount').checked=accountCreationBlocked;
$('#mw-input-wpDisableEmail').checked=disableEmail;
$('#mw-input-wpDisableUTEdit').checked=disableUserTalk;
$('#mw-input-wpAutoBlock').checked=autoBlock;
$('#mw-input-wpWatch').checked=watch;
$('#mw-input-wpHardBlock').checked=!anonOnly;
}
function userIsInGroup( group ) {
	return ( mw.config.get('wgUserGroups') != null && mw.config.get('wgUserGroups').indexOf( group ) != -1 ) || ( mw.config.get('wgUserGroups') == null && group == 'anon' );
}
 
 
function addblockoptions() { // options: anon only/autoblock/account creation blocked/email blocked/watch/disable editing of user talk
	mw.util.addPortletLink('p-cactions',
		'javascript:QuickBlock("indefinite","[[Wikipedia:Vandalism|Vandalism-only]] account",0,1,1,0,0,0)',
		'vandal: indef',
		'p-block-vandalism');
	mw.util.addPortletLink('p-cactions',
		'javascript:QuickBlock("indefinite","Abusing [[Wikipedia:Sock puppetry|several accounts]]",0,1,1,0,0,0)',
		'sock: indef',
		'p-block-sock');
	mw.util.addPortletLink('p-cactions',
		'javascript:QuickBlock("24 hours","[[Wikipedia:Vandalism|Vandalism]]",1,1,1,0,0,0)',
		'vandal: 24h',
		'p-block-24h');
	mw.util.addPortletLink('p-cactions',
		'javascript:QuickBlock("31 hours","[[Wikipedia:Vandalism|Vandalism]]",1,1,1,0,0,0)',
		'vandal: 31h',
		'p-block-31h');
	mw.util.addPortletLink('p-cactions',
		'javascript:QuickBlock("1 week","[[Wikipedia:Vandalism|Vandalism]]",1,1,1,0,0,0)',
		'vandal: 1w',
		'p-block-week');
	mw.util.addPortletLink('p-cactions',
		'javascript:QuickBlock("indefinite","Spambot",1,1,1,1,0,1)',
		'spambot',
		'p-spambot');
	mw.util.addPortletLink('p-cactions',
		'javascript:QuickBlock("72 hours","[[:en:Wikipedia:Abuse response/Samlaptop|Long-term abuse]]",1,1,1,1,0,1)',
		'lta: samlaptop',
		'p-samlaptop');
	mw.util.addPortletLink('p-cactions',
		'javascript:QuickBlock("2 weeks","{{User:Chenzw/Reports/Pakistan/blockreason}}",1,1,0,0,0,0)',
		'lta: pakistan',
		'p-pakistan');
}
// options: anon only/autoblock/account creation blocked/email blocked/watch/disable editing of user talk

if ( mw.config.get('wgCanonicalSpecialPageName') == 'Block' )$(addblockoptions);
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy