User:LordVoldemort728/copyviocheck.js

mw.notify('The script you are importing, User:FR30799386/copyvio-check.js, has been deprecated. A forked replacement is available at https://w.wiki/4vAP') $(document).ready(function {	var runcheck=function{		$.ajax('//tools.wmflabs.org/copyvios/api.json?version=1&action=search&project=wikipedia&lang=en&title=' + mw.config.get('wgTitle')).then(function(result) { if ((Math.round(result.best.confidence * 100)) < 50) { $('#FRvio').css('background', '#EFE'); } else if ((Math.round(result.best.confidence * 100)) > 50) { $('#FRvio').css('background', '#FEE'); }               $('#FRvio').html('Around ' + Math.round(result.best.confidence * 100).toString + '% chance of being a copyvio' +                    ' (view details)'); });	};	if(mw.config.get('wgNamespaceNumber') === 0|| mw.config.get('wgNamespaceNumber') === 2)	{   var counter = 0;    setInterval(function { if ($('.mwe-pt-toolbar-big').length && !counter) { counter++; if($('.redirectMsg').length) {              $('#mwe-pt-info > div.mwe-pt-tool-flyout').append(' Redirect are not normally copvios.'               +'(check anyway) '); $('#FRvio-redirect-check').click(function(e){              	e.preventDefault;               	$('#FRvio').css('background','#e8e8e8').text('Calculating copyvio percentage...');               	runcheck;               	return false;               }); }           else {                $('#mwe-pt-info > div.mwe-pt-tool-flyout').append(' '                 +'Calculating copyvio percentage... '); $('#mwe-pt-info > div.mwe-pt-tool-icon-container > img').on('click',function(e){           	 	e.preventDefault;            	 	runcheck;            	 	return false;            	 }); }       }    }, 250);	} });