User:Luk/block.js
// ======== QuickBlocks =======
function QuickBlock(expiry, reason, ao, autob, accfreeze, emailblock, watch, addUnblockMessage, submit) {
var blockForm = document.getElementsByClassName('mw-htmlform')[0];
var inputs = blockForm.getElementsByTagName('input');
var unblockMessage = 'To appeal or request help, please [[User:Luk#How_to_contact_me|contact me]] or follow the instructions below';
var unblockMessageIp = 'To appeal or request help, please follow the instructions below';
var isUser = document.getElementById('t-emailuser');
for (var i = 0; i < inputs.length; i++) {
if (inputs[i].name == 'wpExpiry-other') {
inputs[i].value = expiry;
continue;
}
if (inputs[i].name == 'wpReason-other') {
if (addUnblockMessage) {
reason += unblockMessage;
}
inputs[i].value = reason;
continue;
}
if (inputs[i].name == 'wpHardBlock') {
if (ao == 0) {
inputs[i].checked = 'checked';
}
else {
inputs[i].checked = false;
}
continue;
}
if (inputs[i].name == 'wpAutoBlock') {
if (autob == 1) {
inputs[i].checked = 'checked';
}
else {
inputs[i].checked = false;
}
continue;
}
if (inputs[i].name == 'wpCreateAccount') {
if (accfreeze == 1) {
inputs[i].checked = 'checked';
}
else {
inputs[i].checked = false;
}
continue;
}
if (inputs[i].name == 'wpDisableEmail') {
if (emailblock == 1) {
inputs[i].checked = 'checked';
}
else {
inputs[i].checked = false;
}
continue;
}
if (inputs[i].name == 'wpWatch') {
if (watch == 1) {
inputs[i].checked = 'checked';
}
else {
inputs[i].checked = false;
}
continue;
}
if (inputs[i].name == 'wpDisableUTEdit') {
if (emailblock == 1) {
inputs[i].checked = 'checked';
}
else {
inputs[i].checked = false;
}
continue;
}
}
if (submit == 1) {
if (document.getElementById('mw-input-wpConfirm').value == '' || confirm('already blocked')) {
// alert('submit');
blockForm.submit();
}
}
}
addOnloadHook(function () {
if (document.title.indexOf("Block user") == -1) {
return;
} else {
//TEMPLATE: addTab('javascript:('+QuickBlock+')("expiry","reason",ao,autob,accfreeze,emailblock)','label','id',autosubmit);
addTab('javascript:QuickBlock("indefinite","",1,1,1,0,1,0,0)', 'indef', 'p-block-tweak');
addTab('javascript:QuickBlock("3 hours","Blocked due to recent [[WP:DIS|abuse of editing privileges]]. Consider improving rather than damaging the work of others.",1,1,1,0,0,1,1)', '3h', 'p-block-ab-3h');
//Blocked due to recent [[WP:DIS|abuse of editing privileges]]. Consider improving rather than damaging the work of others. To appeal or request help, please follow the instructions below.
addTab('javascript:QuickBlock("3 hours","Blocked due to recent [[WP:VAN|vandalism]] attempts (triggering the abuse filter). Consider improving rather than damaging the work of others.",1,1,1,0,0,1,1)', '3af', 'p-block-ab-3ab');
addTab('javascript:QuickBlock("31 hours","You have been blocked for one day, due to recent [[WP:DIS|abuse of editing privileges]].",1,1,1,0,1,1,1)', '31', 'p-block-ab-31h');
//Blocked for one day, due to recent [[WP:DIS|abuse of editing privileges]]. To appeal or request help, please [[Special:Emailuser/Lucasbfr|contact me]] or follow the instructions below.
addTab('javascript:QuickBlock("55 hours","You have been blocked for a few days, due to recent [[WP:DIS|abuse of editing privileges]].",1,1,1,0,1,1,1)', '55', 'p-block-ab-48h');
//Blocked for a few days, due to recent [[WP:DIS|abuse of editing privileges]]. To appeal or request help, please [[Special:Emailuser/Lucasbfr|contact me]] or follow the instructions below.
addTab('javascript:QuickBlock("55 hours","This IP address has recently been used abusively.",0,1,1,0,1,1,1)', '55-h', 'p-block-ab-55-hard');
//This IP address has recently been used abusively. To appeal or request help, please [[Special:Emailuser/Lucasbfr|contact me]] or follow the instructions below.
addTab('javascript:QuickBlock("8 days","Blocked for a few days, due to recent [[WP:DIS|abuse of editing privileges]].",1,1,1,0,1,1,1)', '1w', 'p-block-ab-1w');
//Blocked for a few days, due to recent [[WP:DIS|abuse of editing privileges]]. To appeal or request help, please [[Special:Emailuser/Lucasbfr|contact me]] or follow the instructions below.
addTab('javascript:QuickBlock("indefinite","You have been blocked indefinitely, due to abuse of editing privileges.",1,1,1,0,1,1,1)', 'indef', 'p-block-ab-ind');
//This user has been blocked indefinitely, due to abuse of editing privileges. To appeal or request help, please [[Special:Emailuser/Lucasbfr|contact me]] or follow the instructions below.
addTab('javascript:QuickBlock("1 month 55 hours","Blocked due to persistent [[WP:DIS|abuse of editing privileges]].",1,1,1,0,1,1,1)', '1m', 'p-block-ab-1m');
//Blocked due to persistent [[WP:DIS|abuse of editing privileges]]. To appeal or request help, please [[Special:Emailuser/Lucasbfr|contact me]] or follow the instructions below.
addTab('javascript:QuickBlock("1 month 55 hours","This IP address has been used abusively. If you are a legitimate user, please tell us: please [[User:Luk#How_to_contact_me|contact me]] or follow the instructions below so we can tweak the block.",0,1,1,0,1,0,1)', 'm-h', 'p-block-ab-1month-hard');
//This IP address has recently been used abusively. To appeal or request help, please [[Special:Emailuser/"+wgUserName+"|contact me]] or follow the instructions below.
addTab('javascript:QuickBlock("1 month 55 hours","{{anonblock}}",1,0,1,0,0,0,1)', 'm-ano', 'p-block-anon-1m');
//{{anonblock}}
addTab('javascript:QuickBlock("1 year 10 days 3 hours","{{anonblock}}",1,0,1,0,0,0,1)', 'y-ano', 'p-block-anon-1y');
//{{anonblock}}
addTab('javascript:QuickBlock("1 year 35 days 3 hours","{{schoolblock}}",1,0,1,0,0,0,1)', 'y-edu', 'p-block-school-1y');
//{{schoolblock}}
addTab('javascript:QuickBlock("15 days","[[WP:Spam|Spamming]] links to external sites. Persistent spammers may have their websites [[mw:Extension:SpamBlacklist|blacklisted]] and penalized by search engines.",1,0,1,0,0,0,0)', 'spam', 'p-block-anon-spam');
//[[WP:Spam|Spamming]] links to external sites. Persistent spammers may have their websites [[mw:Extension:SpamBlacklist|blacklisted]] and penalized by search engines.
addTab('javascript:QuickBlock("indefinite","[[WP:Spam|Spamming]] links to external sites. Persistent spammers may have their websites [[mw:Extension:SpamBlacklist|blacklisted]] and penalized by search engines.",1,1,1,0,1,1,1)', 'spamusr', 'p-block-user-spam');
//[[WP:Spam|Spamming]] links to external sites. Persistent spammers may have their websites [[mw:Extension:SpamBlacklist|blacklisted]] and penalized by search engines.
addTab('javascript:QuickBlock("indefinite","[[WP:SOCK|Abusing multiple accounts]].",1,1,1,0,1,1,0)', 'sock', 'p-block-sock-ind');
//[[WP:SOCK|Abusing multiple accounts]]. To appeal or request help, please [[Special:Emailuser/Lucasbfr|contact me]] or follow the instructions below.
addTab('javascript:QuickBlock("indefinite","abuse",1,1,1,1,1,0,1)', 'troll', 'p-block-grawp');
addTab('javascript:QuickBlock("indefinite","{{usernameblocked|}}",1,0,0,0,1,0,0)', 'usr', 'p-block-username');
//{{Usernameblocked}}
}
}
);
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.