User:Lightdarkness/prod.js

// - // Our nice Revert functions // - var gml_vandal, gml_editor, gml_url;

function PerformHistory { gml_xmlhttp = HTTPClient; if (!gml_xmlhttp) return; history_url = 'http://en.wikipedia.org/w/index.php?title=' + document.getElementsByTagName('b')[0].getElementsByTagName('a')[0].innerHTML + '&action=history&limit=50'; gml_xmlhttp.open("GET", history_url, true); gml_xmlhttp.onreadystatechange = HistoryStepTwo; gml_xmlhttp.send(null); }

function HistoryStepTwo { if (gml_xmlhttp.readyState != 4) return var form, newform, l; // Insert the downloaded form in our current page, using // only hidden form inputs. doc = gml_XMLParse(gml_xmlhttp.responseText); bodyConToTheTent = doc.getElementById('bodyContent').innerHTML; document.getElementById('bodyContent').innerHTML += bodyConToTheTent; document.getElementsByTagName('h1')[0].innerHTML = document.getElementsByTagName('b')[0].getElementsByTagName('a')[0].innerHTML; }

function PRODArticle { if(location.href.indexOf('&fakeaction=PROD') != -1){ PerformHistory; } }

/* */