User:ST47/cu-copy-paste.js

if (window.location.href.indexOf("Special:CheckUser") > -1 && window.location.href.indexOf("Special:CheckUserLog") == -1) { mw.loader.using('mediawiki.util', function {		var textfield = ' ';		$('body').prepend(textfield);		$('a.mw-userlink').each(function { var name = $(this).text; var append = 'Copy '; $($.parseHTML(append)).insertAfter($(this)); });		function cuUserSelected {			var contents = "";			Array.prototype.forEach.call($("input[name='users[]']:checked"), function(item){ contents = "** \n" + contents; });			$('#mw-checkuser-cidrform textarea').val(contents);		}		$("input[name='users[]']").change(cuUserSelected);	}); }