Usuario:Shooke/vector

De Wikisource, la biblioteca libre.
Ir a la navegación Ir a la búsqueda

Nota: tras guardar, quizás necesites actualizar la caché de tu navegador para ver los cambios.

  • Firefox/Safari: Mantén presionada la tecla Mayús mientras pulsas el botón Actualizar, o presiona Ctrl+F5 o Ctrl+R (⌘+R en Mac)
  • Google Chrome: presiona Ctrl+Shift+R (⌘+Mayús+R en Mac)
  • Internet Explorer: mantén presionada Ctrl mientras pulsas Actualizar, o presiona Ctrl+F5
  • Opera: dirígete a Menú → Configuración (Opera → Preferencias en Mac) y luego a Privacidad y seguridad → Borrar datos de navegación → Imágenes y archivos en caché.
/*window.hotcat_translations_from_commons = true;
 

 This imports the latest version of HotCat from Commons.
 HotCat is a gadget to make changes to categories much easier.
 Full documentation can be found at http://commons.wikimedia.org/wiki/Help:Gadget-HotCat

mw.loader.load( '//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-HotCat.js&action=raw&ctype=text/javascript' );
*/
//<pre>
//Fuente: http://en.wikipedia.org/wiki/Usuario:Lorian/monobook.js
//Personalizada por Axxgreazz, para el [[w:es:User:Axxgreazz/Monobook-Suite]]
//http://es.wikipedia.org/wiki/Usuario:Axxgreazz/Monobook-Suite

var Reve = 'Revert';
var Mess = 'Message';
var Warn = 'Warn'; 
var WarnSummary = 'Warning with';
var RevertSummary1 = 'Reverted edits by'; 
var RevertSummary2 = 'to last version'; 
var RevertSummary3 = 'by'; 

// Revert tools
function getElementsByClass(searchClass,node,tag) {
  // Function from http://www.dustindiaz.com/getelementsbyclass/
  var classElements = new Array();
  if ( node == null )
    node = document;
  if ( tag == null )
    tag = '*';
  var els = node.getElementsByTagName(tag);
  var elsLen = els.length;
  var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
  for (i = 0, j = 0; i < elsLen; i++) {
    if ( pattern.test(els[i].className) ) {
      classElements[j] = els[i];
      j++;
    }
  }
  return classElements;
}

// _GET code from NoGray JS Library http://www.nogray.com/new_site/
var _GET = new Array();
var _uri = location.href;

var _temp_get_arr = _uri.substring(_uri.indexOf('?')+1, _uri.length).split("&");

var _temp_get_arr_1 = new Array();

for(_get_arr_i=0; _get_arr_i<_temp_get_arr.length; _get_arr_i++){
  _temp_get_arr_1 = _temp_get_arr[_get_arr_i].split("=");
  _GET[decodeURI(_temp_get_arr_1[0])] = decodeURI(_temp_get_arr_1[1]);
}

delete _uri; delete _temp_get_arr; delete _temp_get_arr_1;

function getMessage (where, user1, user2, oldid) 
{
   var message = prompt (msStringU('Message') + ':', '');
   if (message!=null) 
   {   window.location = 'http://'+ location.hostname + '/w/index.php?title=' + 
                         _GET['title'] + '&action=edit&oldid=' + oldid + 
                         '&'+where+'=2&user1='+user1+'&user2='+user2+'&message='+message;
   }
}

addOnloadHook(function ()
{
   if (typeof ms_Activa_Reversion == 'undefined') { ms_Activa_Reversion = true;}
   if (!msActivarModulo(ms_Activa_Reversion)) return;

   if (location.href.match(/diff=/)) 
   {  // Get username of submitter
      var user1 = getElementsByClass('diff-otitle',null,'td'); 
      if (user1[0])
      {
         user1 = user1[0].getElementsByTagName('a')[2].innerHTML;
   
         var user2 = getElementsByClass('diff-ntitle',null,'td'); 
         if (user2[0].getElementsByTagName('a')[2].href.indexOf ('undo=') != -1)
         {   user2 = user2[0].getElementsByTagName('a')[3].innerHTML; }
         else
         {   user2 = user2[0].getElementsByTagName('a')[2].innerHTML; }
       
         var oldid = getElementsByClass('diff-otitle',null,'td'); 
         oldid = oldid[0].getElementsByTagName('a')[0].href.split("oldid=")[1];

         var msAviTemp = '';
         if (msTestMsgTL) 
         for (i=0; i<msTestMsgTL.length; i++)
         {
            if (i == msTestMsgTL.length - 1) separador = ')';
            else separador = ' / ';
            msAviTemp = msAviTemp 
                        + '<a href="http://' + location.hostname + '/w/index.php?title=User_talk:' 
                        + user2 + '&action=edit&warnMS=' + i + '&titleP=' + wgPageName.replace(/_/g , ' ') 
                        + '">' + msStringU(msTestMsgTL[i]) + '</a>' + separador; 
         }
         else msAviTemp = msStringU('This wiki project does not have user message templates') + ')';

         document.getElementById('contentSub').innerHTML = '('
         + '<a href="http://' + location.hostname + '/w/index.php?title=' + _GET['title'] 
         + '&action=edit&oldid=' + oldid + '&revertMS=1&user1=' + user1 
         + '&user2=' + user2 + '">' + msStringU(Reve) + '</a> / ' 
         + '<a href="javascript:var message = getMessage(\'revertMS\', \'' + user1 + '\', \''
         + user2 + '\', \'' + oldid + '\');">' + msStringU(Mess) + '</a>) ' 
         + '(' + msStringU(Warn) + ': ' + msAviTemp;   
      }
  }  
  else if (location.href.match(/revertMS=1/)) 
  {
    document.getElementById('wpSummary').value = msStringU(RevertSummary1) + ' ' + '[[User:' + _GET['user2'] + '|' + _GET['user2'] + ']]' + ' ' + msStringU(RevertSummary2) + ' ' + msStringU(RevertSummary3) + ' ' + '[[User:' + _GET['user1'] + '|' + _GET['user1'] + ']]' + msStringU(msSummaryLinkU);
    document.getElementById('editform').submit();
  } else if (location.href.match(/revertMS=2/)) {
    document.getElementById('wpSummary').value = msStringU(RevertSummary1) + ' ' + '[[User:' + _GET['user2'] + '|' + _GET['user2'] + ']]' + ' ' + msStringU(RevertSummary2) + ' ' + msStringU(RevertSummary3) + ' ' + '[[User:' + _GET['user1'] + '|' + _GET['user1'] + ']]' + msStringU(msSummaryLinkU) + ' (' + _GET['message'] + ')';
    document.getElementById('editform').submit();
  } else if (wgCanonicalNamespace == 'User_talk' && wgAction == "edit" && location.href.indexOf("warnMS=")>0) 
    
    {  var indice = parseInt(location.href.substring(location.href.indexOf("&titleP=")-1,location.href.indexOf("&titleP=")));
       var parametros='';
       if (indice == 0) { parametros = '|' + _GET['titleP']; }
       document.getElementById('wpSummary').value = msStringU(WarnSummary) + ' ' + msSummaryLink;
       document.getElementById('wpTextbox1').value = document.getElementById('wpTextbox1').value + '\n{{sub'+'st:' 
                                                   + msTestTL[indice+2] + parametros + '}} ~~'+'~~';
       document.getElementById('editform').submit();
    }
});
//</pre>