User:Gracenotes/PUI.js

// /* Tag the image with a or  (possibly from a tab that is only visible on a page in the Image: namespace.) Pop-up a window for the uploader of this image, and add Image:filename.ext to the bottom of the User talk page.

Pop-up a second window with Wikipedia:Possibly unfree images, and place at the bottom of the page Image:filename.ext - ~ */

//global variable var templateCase = 0;

//global array var templateArray = { 1: ['PUIdisputed', false, 'idw-pui', true, 'Wikipedia:Possibly unfree images'], 2: ['PUInonfree', false, 'idw-pui', true, 'Wikipedia:Possibly unfree images'], }

//if image page, and not from commons $(function { if (wgNamespaceNumber == 6 && document.getElementById('filehistory')) {    var templateSelect = document.createElement('div');    //create HTML string in templateString, and then stuff it into     //templateSelect using innerHTML: not elegant, but fast    var templateString = '\n(Select a template) \n';    for (i in templateArray) {      templateString += ''+(templateArray[i][0])+' \n';    }    templateString += ' ';    templateSelect.innerHTML = templateString;    document.getElementById('file').appendChild(templateSelect);  } });

function section(header, text) { this.header = header; this.text = text; this.construct = function { return (this.header ? '==' + this.header + '==\n' : ) + this.text +  + ''; } }

//we'll be needing 3 of these function asyncPost(page, text) { //properties this.page = page; this.text = text; this.textbox = null; this.saveaction = null; this.confirmation = false; this.done = false; //methods this.requestPage = function {}; this.confirmPost = function {}; this.addContent = function {}; this.savePage = function {}; this.doAble = function {}; } //