MediaWiki:JSScripts/CopyScape
Aparença
//
/* * Detectaire de plagiats * * Utiliza copyscape.com per trobar los plagiats de sites web * * Autor : Pabix * Amelhoracion : djo0012 * Darrièra revision : 3 de novembre de 2006 */ function getArticleNameURL() { var strOut = document.URL; strOut = strOut.replace('//oc.wikipedia.org/wiki/', ""); return strOut; } function plagiarismsearch(){ var formElement = document.createElement('form'); formElement.setAttribute('method', 'post'); formElement.setAttribute('id', 'copyscapequery'); formElement.setAttribute('name', 'copyscapequery'); formElement.setAttribute('action', 'http://www.copyscape.com/?results'); var queryInput = document.createElement('input'); queryInput.setAttribute('name', 'q'); queryInput.setAttribute('type', 'hidden'); queryInput.setAttribute('value', "//fr.wikipedia.org/w/index.php?title="+getArticleNameURL()+"&action=raw"); formElement.appendChild(queryInput); var queryGO = document.createElement('a'); queryGO.setAttribute('href', 'javascript:document.forms.copyscapequery.submit();'); var queryText = document.createTextNode('copyscape'); queryGO.appendChild(queryText); var link = document.createElement('li'); link.setAttribute ('id', 'ca-copyscape'); link.appendChild(queryGO); link.appendChild(formElement); var panelControl = document.getElementById('p-cactions'); if (panelControl) { panelLinks = panelControl.getElementsByTagName('ul')[0]; if (panelLinks){ panelLinks.appendChild(link); } } } addLoadEvent(plagiarismsearch); //