User:Dominic/monobook.js

/////////////////////////////CLIENT SIDE CHECKUSER IP info retriever///////////////////////////// //security override HTTP request //ALSO, reduce IE security settings //For FF/NS, go enable, see "http://esw.w3.org/topic/SparqlCalendarDemoUsage#FAQ" //Basically, enable "signed.applets.codebase_principal_support" in about:config

$(WHOIScheck) function WHOIScheck { if (location.href.indexOf('Special:CheckUser') ==-1) return; var body=document.getElementById('bodyContent'); if (!body) return; addTab("javascript:CU_comprehensive", "WHOIS all IPs", "ca-checkall", "Check all IPs", ""); }

// function makeCURequestXML_DNS(type, url, parameters) {  if(window.XMLHttpRequest) { try {netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); } catch (e) {alert("Permission UniversalBrowserRead denied. Please enable 'signed.applets.codebase_principle_support' through 'about:config' in your browser."); } http_request = false; http_request = new XMLHttpRequest; if (!http_request) {alert('Cannot create XMLHTTP instance'); return false;} http_request.onreadystatechange = CU_comprehensive_check_WHOIS; http_request.open(type, url, true); http_request.send(parameters); } else if (window.ActiveXObject) {   try {http_request = new ActiveXObject("Msxml2.XMLHTTP");} catch (e) {     try {http_request = new ActiveXObject("Microsoft.XMLHTTP");} catch (e){} } if (!http_request) {showError(ERROR_XML);} http_request.onreadystatechange = CU_comprehensive_check_WHOIS; http_request.open(type, url, true); http_request.send(parameters); } } //

// function makeCURequestXML_WHOIS(type, url, parameters) {  if(window.XMLHttpRequest) { try {netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"); } catch (e) {alert("Permission UniversalBrowserRead denied. Please enable 'signed.applets.codebase_principle_support' through 'about:config' in your browser."); } http_request = false; http_request = new XMLHttpRequest; if (!http_request) {alert('Cannot create XMLHTTP instance'); return false;} http_request.onreadystatechange = CU_comprehensive_check_parse; http_request.open(type, url, true); http_request.send(parameters); } else if (window.ActiveXObject) {   try {http_request = new ActiveXObject("Msxml2.XMLHTTP");} catch (e) {     try {http_request = new ActiveXObject("Microsoft.XMLHTTP");} catch (e){} } if (!http_request) {showError(ERROR_XML);} http_request.onreadystatechange = CU_comprehensive_check_parse; http_request.open(type, url, true); http_request.send(parameters); } } //

//IP/WHOIS for CU principle results// CU_li_index = 0; function CU_comprehensive { var results = document.getElementById('bodyContent').getElementsByTagName('ul')[0]; if (!results) {alert('There are no elements in this list.'); return;} if (!results.getElementsByTagName('li')[0]) {alert('There are no elements in this list.'); return;} var ls = results.getElementsByTagName('li'); if (!ls[0].getElementsByTagName('a')[0]) {alert('There are no expected elements in this list.'); return;} if (document.getElementById('contentSub').innerHTML.search(/Checking all IPs, please wait...|All data retrieved:/) != -1) {alert('Results already shown.'); return;} document.getElementById('contentSub').innerHTML += ' Checking all IPs, please wait...'; CU_comprehensive_check; }

function CU_comprehensive_check { var list = document.getElementById('bodyContent').getElementsByTagName('ul')[0]; if (list.getElementsByTagName('li')[CU_li_index] && list.getElementsByTagName('li')[CU_li_index].getElementsByTagName('a')[0]) { var link = list.getElementsByTagName('li')[CU_li_index].getElementsByTagName('a')[0].href; var name = list.getElementsByTagName('li')[CU_li_index].getElementsByTagName('a')[0].innerHTML; if (name.search(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/) !=-1) {   var URL = 'http://www.dnsstuff.com/tools/ipall.ch?domain=' + name; CU_comprehensive_check_DNS(URL); } else {CU_li_index+=1; CU_comprehensive_check;} } else if (list.getElementsByTagName('li')[CU_li_index]) {CU_li_index+=1; CU_comprehensive_check;} else { document.getElementById('contentSub').innerHTML = ' All data retrieved: DNS/WHOIS scan completed. '; } }

function CU_comprehensive_check_DNS(URL) { var list = document.getElementById('bodyContent').getElementsByTagName('ul')[0]; var name = list.getElementsByTagName('li')[CU_li_index].getElementsByTagName('a')[0].innerHTML; document.getElementById('contentSub').innerHTML = ' Retrieving DNS XML page data for ' + name + '... '; makeCURequestXML_DNS("GET",URL,null); }

function CU_comprehensive_check_WHOIS { if (http_request.readyState != 4) return; xml_DNS_user_CU = http_request.responseText; var list = document.getElementById('bodyContent').getElementsByTagName('ul')[0]; var name = list.getElementsByTagName('li')[CU_li_index].getElementsByTagName('a')[0].innerHTML; var URL = 'http://www.dnsstuff.com/tools/whois.ch?ip=' + name; document.getElementById('contentSub').innerHTML = ' Retrieving WHOIS XML page data for ' + name + '... '; makeCURequestXML_WHOIS("GET",URL,null); }

function CU_comprehensive_check_parse { if (http_request.readyState != 4) return; xml_WHOIS_user_CU = http_request.responseText; var list = document.getElementById('bodyContent').getElementsByTagName('ul')[0]; var name = list.getElementsByTagName('li')[CU_li_index].getElementsByTagName('a')[0].innerHTML; document.getElementById('contentSub').innerHTML = ' Parsing WHOIS XML page data for ' + name + '... '; //WHOIS //xml_WHOIS_user_CU = http_request.responseXML; if (xml_WHOIS_user_CU.indexOf(' Whois Record ') !=-1) {xml_WHOIS_user_CU = http_request.responseText.split(' Whois Record ')[1];} else if (xml_WHOIS_user_CU.indexOf('Whois Record') !=-1) {xml_WHOIS_user_CU = http_request.responseText.split('Whois Record')[1];} if (xml_WHOIS_user_CU.indexOf('') != -1) {xml_WHOIS_user_CU = xml_WHOIS_user_CU.split('')[1].split(' ')[0];} //parse WHOIS results var OrgName=''; var Address=''; var City=''; var StateProv=''; var Country=''; var CIDR=''; if (xml_WHOIS_user_CU.indexOf('OrgName:') !=-1) {OrgName = xml_WHOIS_user_CU.split('OrgName:')[1].split('\n')[0].split('\r')[0].split(']')[0] + ', ';} if (xml_WHOIS_user_CU.indexOf('Address:') !=-1) {Address = xml_WHOIS_user_CU.split('Address:')[1].split('\n')[0].split('\r')[0].split(']')[0] + ', ';} if (xml_WHOIS_user_CU.indexOf('City:') !=-1) {City = ' ' + xml_WHOIS_user_CU.split('City:')[1].split('\n')[0].split('\r')[0].split(']')[0] + ' ' + ', ';} if (xml_WHOIS_user_CU.indexOf('StateProv:') !=-1) {StateProv = xml_WHOIS_user_CU.split('StateProv:')[1].split('\n')[0].split('\r')[0].split(']')[0] + ', ';} if (xml_WHOIS_user_CU.indexOf('OrgName:') !=-1) {Country = xml_WHOIS_user_CU.split('Country:')[1].split('\n')[0].split('\r')[0].split(']')[0] + ', ';} if (xml_WHOIS_user_CU.indexOf('CIDR:') !=-1) {CIDR = xml_WHOIS_user_CU.split('CIDR:')[1].split('\n')[0].split('\r')[0].split(']')[0];} if (xml_WHOIS_user_CU.search(/(OrgName|Address|City|StateProv|Country):/) ==-1 && xml_WHOIS_user_CU.indexOf(' ') != -1) {OrgName = xml_WHOIS_user_CU.split(' ')[1].split(' ')[0] + ', ';} var output_IP_info = ' ' + OrgName + ' ' + Address + City + ' ' + StateProv + ' ' + ' + Country + '; if (CIDR !='') output_IP_info += ' CIDR: ' + CIDR; //parse DNS items document.getElementById('contentSub').innerHTML = ' Parsing DNS XML page data for ' + name + '... '; if (xml_DNS_user_CU.indexOf('') != -1) {xml_DNS_user_CU = xml_DNS_user_CU.split('')[1].split('')[0];} var rev_DNS_info = ''; if (xml_DNS_user_CU.indexOf('Reverse DNS:') !=-1) {rev_DNS_info = ' ' + xml_DNS_user_CU.split('Reverse DNS:')[1].split('\n')[0].split('\r')[0] + ' ';} output_IP_info += ' DNS :' + rev_DNS_info; output_IP_info = output_IP_info.replace(/Internet Assigned Numbers Authority/,'IANA'); list.getElementsByTagName('li')[CU_li_index].innerHTML += ' ' + output_IP_info + ' '; // CU_li_index += 1; CU_comprehensive_check; } //////////////

// install User:Dmcdevit/LowercaseConversion.js document.write('');

// From WikiProject User_scripts/Scripts/Add_LI_link, revision 73544143 function addlilink(tabs, url, name, id, title, key){ var na = document.createElement('a'); na.href = url; na.appendChild(document.createTextNode(name)); var li = document.createElement('li'); if(id) li.id = id; li.appendChild(na); tabs.appendChild(li); if(id) {       if(key && title) {           ta[id] = [key, title]; }       else if(key) {           ta[id] = [key, '']; }       else if(title) {           ta[id] = ['', title]; }   }    // re-render the title and accesskeys from existing code in wikibits.js    akeytt; return li; }

// install User:Dominic/PreloadedArticleTabs.js document.write('');

importScript('User:Lupin/autoedit.js', 'en.wikipedia.org','46637295'); importScript('User:Conrad.Irwin/creation.js');