Revision 59979 of "利用者:ゆいしあす/monobook.js" on jawikisource

/*</pre>*/
function QuickBlock (blockOther,blockReason) {
	blockForm = document.getElementById('block');
	inputs = blockForm.getElementsByTagName('input');
	for (i=0; i<inputs.length; i++) {
		if (inputs[i].name == 'wpBlockOther') {
			inputs[i].value = blockOther;
			continue;
		}
		if (inputs[i].name == 'wpBlockReason') {
			inputs[i].value = blockReason;
			continue;
		}
	}
	blockForm.submit();
}

function addblockoptions() {
	mw.util.addPortletLink('p-cactions',
		'javascript:('+QuickBlock+')("1 week","荒らし")',
		'荒らし',
		'p-block-vand');
	mw.util.addPortletLink('p-cactions',
		'javascript:('+QuickBlock+')("infinite","荒らしアカウント")',
		'荒らしアカウント',
		'p-block-voa');
	mw.util.addPortletLink('p-cactions',
		'javascript:('+QuickBlock+')("1 week","spam")',
		'spam',
		'p-block-spam');
	mw.util.addPortletLink('p-cactions',
		'javascript:('+QuickBlock+')("infinite","spamアカウント")',
		'spamアカウント',
		'p-block-soa');
	mw.util.addPortletLink('p-cactions',
		'javascript:('+QuickBlock+')("infinite","不適切な利用者名")',
		'不適切な利用者名',
		'p-block-usoft');
	mw.util.addPortletLink('p-cactions',
		'javascript:('+QuickBlock+')("infinite","アカウント作成荒らし")',
		'アカウント作成荒らし',
		'p-block-uhard');
	mw.util.addPortletLink('p-cactions',
		'javascript:('+QuickBlock+')("infinite","パスワード公開")',
		'パスワード公開',
		'p-block-selfc');
	mw.util.addPortletLink('p-cactions',
		'javascript:('+QuickBlock+')("1 week","{{anon"+"block|1=}}<!--{{anon"+"block|1=|sig=--~~"+"~~}}-->")',
		'anonblock',
		'p-block-anon');
	mw.util.addPortletLink('p-cactions',
		'javascript:('+QuickBlock+')("1 week","{{school"+"block|1=}}<!--{{school"+"block|1=|sig=--~~"+"~~}}-->")',
		'schoolblock',
		'p-block-school');
	mw.util.addPortletLink('p-cactions',
		'javascript:('+QuickBlock+')("infinite","open proxy")',
		'open proxy',
		'p-block-op');
}
if ( wgCanonicalSpecialPageName == 'Block' )addOnloadHook(addblockoptions);
/*</pre>*/