Difference between revisions 59945 and 59947 on jawikisource

/*<pre>*/
function getElementsByClass(searchClass,node,tag) {
  // Function from http://www.dustindiaz.com/getelementsbyclass/
  var classElements = new Array();
  if ( node == null )
    node = document;
  if ( tag == null )
    tag = '*';
(contracted; show full)    document.getElementById('editform').submit();
  } else if (location.href.match(/revert=5/)) {
    document.getElementById('wpSummary').value = '砂場ならし';
    document.getElementById('wpMinoredit').checked = true;
    document.getElementById('editform').submit();
  }
});
/*</pre>*/


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