User:TheFearow/autoping.js

// Auto-pings Technorati occasionally.

if(navigator.userAgent.indexOf("MSIE") == -1){ //Disables for IE, AJAX etc is really bugged in IE, wont work without major rewrite and server-side extension.

function doping{ if(wgAction != "purge"){ return; } xmlhttp = sajax_init_object; xmlhttp.overrideMimeType('text/xml'); xmlhttp.open( 'POST', 'http://rpc.technorati.com/rpc/ping', true); xmlhttp.setRequestHeader('Content-Type', 'text/xml'); xmlhttp.onload = function { } xmlhttp.send('weblogUpdates.ping  Wikinews    http://en.wikinews.org/wiki/' + wgPageName + '   '); }

doping;

function sajax_init_object { var A;	try { // Try the new style before ActiveX so we don't		// unnecessarily trigger warnings in IE 7 when // set to prompt about ActiveX usage A = new XMLHttpRequest; } catch (e) { try { A=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { A=new ActiveXObject("Microsoft.XMLHTTP"); } catch (oc) { A=null; }		}	}

return A; } }