User:Amarkov/aiv.js

// Script from User:Amarkov/linkedpagecontentadder.js

//Or it will be when that is done, at least

// This is a javascript tool which reports things to AIV, which should work for any browser

function aivreport {

var username = location.href.split(':')[2]; var reason = prompt("Reason? (Don't use = or &)") var IP = prompt("Type IP if not a username, and leave it blank otherwise") window.location.href="http://en.wikipedia.org/w/index.php?title=Wikipedia:Administrator intervention against vandalism&action=edit&" + username + "=" + IP + "&" + reason + "=squeak&fakeparam=broom"; } function addaivreport {

addTab("javascript:aivreport", "AIV", "ca-AIV", "AIV", ""); akeytt; }

if (document.title.indexOf("User talk:") == 0) {

addOnloadHook(addaivreport); }

function makereport {

var username = location.href.split('&')[4] var IP = location.href.split('&')[5] var reason = location.href.split('&')[6] document.editform.wpTextbox1.value = document.editform.wpTextbox1.value + '{' + '{' + IP + 'vandal' + '}' + '}' + ' ' + reason; document.editform.wpSummary.value = 'Reporting a vandal (actually, testing a tool)'; document.editform.wpMinoredit.checked = false; // document.editform.submit;

} }

if (document.URL.lastIndexOf("&fakeparam=broom") == -1) {

addOnloadHook(makereport); }