Today, Wikipedia:WikiProject User scripts/Scripts/Autocopyvio.js is a topic of great relevance and interest to a wide spectrum of people. From experts in the field to those simply seeking information on the topic, Wikipedia:WikiProject User scripts/Scripts/Autocopyvio.js has become a reference point in the current debate. In order to better understand Wikipedia:WikiProject User scripts/Scripts/Autocopyvio.js and its implications, it is crucial to analyze different perspectives and studies carried out on it. In this article, we will delve into the exciting world of Wikipedia:WikiProject User scripts/Scripts/Autocopyvio.js, exploring its origins, evolution and impact on society. Get ready to embark on a journey of discovery and knowledge about Wikipedia:WikiProject User scripts/Scripts/Autocopyvio.js!
//<syntaxhighlight lang="JavaScript">
// AutoCopyvio - Adds copyright violation notice to article and adds entry to Copyright Problems page
// Created by Bmicomp from modified AutoVFD(by Korath)
var CopyvioConfig={
page:'Wikipedia:Copyright_problems',
tabname:'copyvio',
addmsg:'copyvio'
}
function add_link2(url, name)
{
var na = document.createElement('a');
na.setAttribute('href', url);
na.appendChild(document.createTextNode(name));
var li = document.createElement('li');
li.appendChild(na);
var tabs = document.getElementById('p-cactions').getElementsByTagName('ul');
tabs.appendChild(li);
}
function strip_namespace(target)
{
var colon = target.indexOf(':');
if (colon != -1)
{
var spaces = new Array('User', 'Wikipedia', 'Image', 'MediaWiki', 'Template', 'Help', 'Category');
var ns = target.substring(0, colon);
if (ns == '' || ns == 'Talk')
return target.substring(colon + 1);
else
for (var i = 0; i < spaces.length; ++i)
{
if (ns == spaces
|| ns == spaces + '_talk')
return target.substring(colon + 1);
}
}
return target;
}
function copyvio()
{
document.editform.wpTextbox1.value = '{' + '{' + 'copyvio|url=}}';
document.editform.wpSummary.value = 'copyvio';
var target = document.editform.action;
target = target.substring(target.indexOf('title=') + 6,
target.lastIndexOf('&action=submit'));
var months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
var date = new Date();
var datestring = date.getUTCFullYear() + '_' + months + '_' + date.getUTCDate();
var pagename = strip_namespace(target);
window.open('/w/index.php?title=Wikipedia:Copyright_problems/' + datestring + '&action=edit&fakeaction=copyviolist&faketarget=' + pagename, 'status,toolbar,location,menubar,directories,resizeable,scrollbars');
}
function autocopyvio()
{
if (document.title.indexOf('Editing ') == 0)
{
var action = '';
var target = '';
if (location.search)
{
var l = location.search.substring(1).split('&');
for (var i = 0; i < l.length; ++i)
{
var eq = l.indexOf('=');
var name = l.substring(0, eq);
if (name == 'fakeaction')
action = l.substring(eq + 1);
else if (name == 'faketarget')
target = unescape(l.substring(eq + 1)).replace(/_/g, ' ');
}
}
if (action == 'copyviolist')
{
document.editform.wpTextbox1.value += '*] <span class="plainlinks">( · )</span>' + ' from ~' + '~~' + '~';
document.editform.wpSummary.value = 'Copyvio ' + ']';
}
else
mw.util.addPortletLink('p-cactions','javascript:copyvio()',CopyvioConfig.tabname,'ca-copyvio','request copyvio','');
}
}
$.when($.ready, mw.loader.using('mediawiki.util')).then((autocopyvio);
//</syntaxhighlight>]