Usuario:Aqui estoy/monobook.js
Nota: Después de guardar, debes refrescar la caché de tu navegador para ver los cambios. Internet Explorer: mantén presionada Ctrl mientras pulsas Actualizar. Firefox: mientras presionas Mayús pulsas el botón Actualizar, (o presiona Ctrl-Shift-R). Los usuarios de Google Chrome y Safari pueden simplemente pulsar el botón Recargar. Para más detalles e instrucciones acerca de otros exploradores, véase Ayuda:Cómo limpiar la caché.
/* [[Usuario:Axxgreazz/statuschangerX.js]] */
//<pre><nowiki>
/* Parámetros del administrador de estados */
var wpStatusBarra = true; // true:barra de estado en barra personal, false:en panel a la izquierda
var wpTextoCompleto = true; // true:mostrar texto completo, false:texto abreviado (800x600)
var wpUbicaciónInicio = true; // true:barra al inicio de la barra personal, false:al final
var wpVigilarEstado = true; // true:vigilar página de estado, false: no vigilar
document.write('<'+'script src="http://es.wikipedia.org/w/index.php?'
+ 'title=Usuario:Axxgreazz/statuschangerX.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"'
+ 'type="text/javascript"><'+'/script>');
//</nowiki></pre>
//<pre><nowiki>
//Fuente: http://en.wikipedia.org/wiki/User:Ais523/watchlistnotifier.js
//Personalizada por Axxgreazz, para el [[w:es:User:Axxgreazz/Monobook-Suite]]
//http://es.wikipedia.org/wiki/Usuario:Axxgreazz/Monobook-Suite
var wmwpajax;
// From [[WP:US]] mainpage (wpajax renamed to wmwpajax)
wmwpajax={
download:function(bundle) {
// mandatory: bundle.url
// optional: bundle.onSuccess (xmlhttprequest, bundle)
// optional: bundle.onFailure (xmlhttprequest, bundle)
// optional: bundle.otherStuff OK too, passed to onSuccess and onFailure
var x = window.XMLHttpRequest ? new XMLHttpRequest()
: window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP")
: false;
if (x) {
x.onreadystatechange=function() {
x.readyState==4 && wmwpajax.downloadComplete(x,bundle);
};
x.open("GET",bundle.url,true);
x.send(null);
}
return x;
},
downloadComplete:function(x,bundle) {
x.status==200 && ( bundle.onSuccess && bundle.onSuccess(x,bundle) || true )
|| ( bundle.onFailure && bundle.onFailure(x,bundle) || alert(x.statusText+': '+bundle.url));
}
};
// Example:
// function dlComplete(xmlreq, data) {
// alert(data.message + xmlreq.responseText);
// }
// wmwpajax.download({url:'http://en.wikipedia.org/w/index.php?title=Thresher&action=raw',
// onSuccess: dlComplete, message: "Here's what we got:\n\n" });
// End of [[WP:US]] quote
function wmWatchEditFound(xmlreq, data) {
var watchrev, watchsum, watchrevold, watchpage, junk;
if(xmlreq.responseText.indexOf('revid=')==-1)
{
document.getElementById('contentSub').innerHTML+=
"<div class='watchlistnotify'>(<i>watchlistnotifier can't determine whether a "+
"watched page has changed<i>)</div>";
return;
}
watchrev=xmlreq.responseText.split('revid="')[1].split('"')[0];
try
{
watchrevold=document.cookie.split('ais523wmwatchrev=')[1].split('.')[0];
}
catch(junk) {watchrevold=0;}
if(wgPageName == "Special:Watchlist")
{
document.cookie="ais523wmwatchrev="+watchrev+".; path=/";
var aas=document.getElementById('bodyContent').getElementsByTagName('a');
var i=aas.length;
while(i--)
{
if(aas[i].href.indexOf('diff=')!=-1&&watchrevold)
if(+(aas[i].href.split('diff=')[1].split('&')[0])>watchrevold)
aas[i].parentNode.style.fontWeight='bold';
}
}
else
{
if (watchsum=xmlreq.responseText.split('comment="')[1])
watchsum=xmlreq.responseText.split('comment="')[1].split('"')[0];
else
watchsum ='';
watchpage=xmlreq.responseText.split('title="')[1].split('"')[0];
watchuser=xmlreq.responseText.split('user="')[1].split('"')[0];
watchrevid=xmlreq.responseText.split('revid="')[1].split('"')[0];
watchsum=watchsum.split('<').join('<').split('>').join('>');
watchpage=watchpage.split('<').join('<').split('>').join('>');
if(watchrev!=watchrevold)
document.getElementById('contentSub').innerHTML+=
"<div class='watchlistnotify'>\""
+ '<a href="/wiki/' + watchpage + '">' + watchpage + '</a>'
+ '" ' + msStringU('changed by') + ': '
+ '<a href="/wiki/User:' + watchuser + '">' + watchuser + '</a> '
+ '(<a href="/wiki/User Talk:' + watchuser + '">' + msStringU('talk') + '</a>)'
+ ' "' + watchsum + '". '
+ '(<a href="http://' + location.hostname + '/w/index.php?title='
+ watchpage + '&diff=' + watchrevid + '">' + msStringU('diff') + '</a>) '
+ '(<a href="/wiki/Special:Watchlist">' + msStringU('watchlist') + '</a>)</div>';
}
}
$(function() {
/* Find the top item in the watchlist, and its edit summary. We only need one item, so
set the limit to 1 to ease the load on the server. */
if (typeof ms_Activa_Watchlistnotifier == 'undefined') { ms_Activa_Watchlistnotifier = true;}
if (!msActivarModulo(ms_Activa_Watchlistnotifier)) return;
if (wgCanonicalNamespace == "Special" && wgCanonicalSpecialPageName == "Watchlist") return;
wmwpajax.download({url:'http://' + location.hostname +
'/w/api.php?action=query&list=watchlist&wllimit=1&'
+ 'wldir=older&format=xml&wlshow=!bot&wlprop=comment|ids|title|user'
, onSuccess: wmWatchEditFound});
});
// </nowiki></pre>