Usuario:Alhen/reversion.js

De Wikilibros, la colección de libros de texto de contenido libre.

Nota: Después de publicar, quizás necesite actualizar la caché de su navegador para ver los cambios.

  • Firefox/Safari: Mantenga presionada la tecla Shift mientras pulsa el botón Actualizar, o presiona Ctrl+F5 o Ctrl+R (⌘+R en Mac)
  • Google Chrome: presione Ctrl+Shift+R (⌘+Shift+R en Mac)
  • Internet Explorer/Edge: mantenga presionada Ctrl mientras pulsa Actualizar, o presione Ctrl+F5
  • Opera: Presiona Ctrl+F5.
//<pre>
var ufb = ', usando [[Usuario:Racso/Fastbuttons|Fastbuttons]]' 
var pagina ='';
var mot='';
var txt='';
var pname= wgPageName;
  

var _GET = new Array();
var _uri = location.href;

if (_uri.indexOf('/w/index.php?')==-1)
{
 _temp_get_arr = 'title=' + _uri.substring(_uri.indexOf('/wiki/')+6,_uri.length);
_temp_get_arr=_temp_get_arr.split("&");
}
else
{
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]);
}
   pagina = _temp_get_arr_1[1];
delete _uri; delete _temp_get_arr; delete _temp_get_arr_1;
 

$(function ()
{

if (wgIsArticle == true ) { 

      document.getElementById('contentSub').innerHTML = document.getElementById('contentSub').innerHTML + '<br>Para bibliotecarios: ' 

      + '<a href="http://' + location.hostname + '/w/index.php?title=' + wgPageName
      + '&action=delete&rapido=si">' + '¡Borrar!' + '</a>' 

      +'<br>Plantillas: ' 

      + '<a href="http://' + location.hostname + '/w/index.php?title=' + wgPageName
      + '&action=edit&plant=wikificar">' + 'Wikificar' + '</a>, ' 

      + '<a href="http://' + location.hostname + '/w/index.php?title=' + wgPageName
      + '&action=edit&plant=wikci">' + 'Wikci' + '</a>' 
}
 


 if (location.href.match(/plant=wikificar/)) 
  {
    txt=document.getElementById("wpTextbox1").value
   if ((txt.match(/{{destruir/)==null) && (txt!=""))
  {
  txt='{{wikificar}}\n'+txt;
 document.getElementById ("wpTextbox1").value=txt; 
  document.editform.wpSummary.value = 'Wikificar'+ufb;
 
   document.editform.submit();
   } 
  }

 else if (location.href.match(/plant=wikci/)) 
  {
    txt=document.getElementById("wpTextbox1").value
  if ((txt.match(/{{destruir/)==null) && (txt!=""))
   {
  txt='{{wikci}}\n'+txt;
 document.getElementById ("wpTextbox1").value=txt;
document.editform.wpSummary.value = 'Al wikcionario'+ufb;
   document.editform.wpSave.click();
   }
  }


 else if (location.href.match(/rapido=si/)) 
  {
   document.getElementById ("wpConfirmB").click();

  }


});
//</pre>