User:Tamzin/AN3 report.js

// In the spirit of MediaWiki:Gadget-DRN-wizard.js and User:Timotheus_Canens/SPIW.js, from which this is adapted. I'm pretty much // clueless with javascript, and the framework of this script is the intelectual property of the contributors listed at those scripts' history // pages.

/** * This is the main object that holds the state for everything */ function AN3W {

//Keep track of what step we are on   this.wizard_step = 0;

//User(s) being reported this.user = '';

//Locus of edit war this.page = '';

//Diff of user being warned this.warning = '';

//blah blah blah... fill in rest later... I get the idea

//User this.drawUserInput = function { //Appends to $("#AN3WContent1")

$("#AN3WContent1").append(" User(s) "); $("#AN3WContent1").append(" The user(s) who you are reporting. If you are reporting more than one user, separate their names with commas." +           "Enter the username or usernames only, without the \"User:\" prefix. ");

var inputbox = $( document.createElement('input') ); inputbox.attr({           type: "text",            name: "User",            value: this.user        }};

inputbox.change( function { gAN3W.user = this.value.replace("https://", "http://").replace("http://en.wikipedia.org/wiki/", "").replace("_", " ").replace("", ).replace("", ).replace("User:", ''); } )

$("AN3WContent1").append( inputbox ); }

//Page this.drawPageInput = function { //Appends to $("#AN3WContent1")

$("#AN3WContent1").append(" Page "); $("#AN3WContent1").append(" The page at which the edit war has occurred. ");

var inputbox = $( document.createElement('input') ); inputbox.attr({           type: "text",            name: "Page",            value: this.page        }};

inputbox.change( function { gAN3W.page = this.value; } );

${"#AN3WContent1").append( inputbox );