User:Platonides/vector.js

mw.loader.load("//es.wikipedia.org/w/index.php?title=Usuario:Platonides/tiempos.js&action=raw&ctype=text/javascript"); /* addOnloadHook( function { if (mw.config.get('wgServer')=="https://secure.wikimedia.org")   return; //Wouldn't be allowed to AJAX a different domain.

var plang = document.getElementById('p-lang'); if (!plang) return;

var lis = plang.getElementsByTagName("div")[0].getElementsByTagName("ul")[0]; var re = /^(http:\/\/[a-z-]+\.[a-z-]+\.org)\/wiki\/(.*)/;

for (li = lis.firstChild; li; li = li.nextSibling) { if (li.nodeType != 1) continue; var a = li.firstChild;

var m = re.exec(a.href);

var xmlhttp = sajax_init_object; if(!xmlhttp) return;

var path = m[1] + "/w/api.php?action=query&prop=revisions&rvprop=size&rvlimit=1&rvdir=older&format=xml&titles=" + m[2]

xmlhttp.open("GET", path, true); xmlhttp.onreadystatechange=function{ if ((xmlhttp.readyState==4)) alert(xmlhttp.status); if ( (xmlhttp.readyState==4) && (xmlhttp.status==200)) { var revs = xmlhttp.responseXML.getElementsByTagName('rev') if (revs.length > 0) { alert(revs[0].getAttribute('size') + " bytes."); a.setAttribute("alt", revs[0].getAttribute('size') + " bytes."); }    }  };  xmlhttp.send(null); }

}); //wgVectorEnabledModules.collapsiblenav = 0;

/* $(document).ready( function {	if ( $.cookie( 'vector-nav-p-lang' ) == null )		$('#p-lang').toggleClass( 'expanded' ).toggleClass( 'collapsed' ).find( 'div.body' ).slideToggle( 'fast' ); }); wgCollapsibleNavBucketTest=true;