Diferencia entre revisiones de «Usuario:Lmorillas/vector.js»

De WikiEducator
Saltar a: navegación, buscar
(update path to spam fighting tools)
(remove obsolete LQT watch checkbox removal, external editor config)
Línea 16: Línea 16:
 
   if (wgAction === 'history') {
 
   if (wgAction === 'history') {
 
     $.getScript('/extensions/WE/deleterevs.js');
 
     $.getScript('/extensions/WE/deleterevs.js');
  }
 
});
 
 
 
 
 
 
/* http://en.wikipedia.org/wiki/Wikipedia:WikiProject_User_scripts/Scripts/External_editor */
 
addOnloadHook(function() {
 
    var editTab = document.getElementById("ca-edit");
 
    if (!editTab) return;
 
    var editURL = editTab.getElementsByTagName("a")[0].href;
 
    addPortletLink("p-cactions", editURL + "&externaledit=true", "EE", "ca-exted", "External editor", "");
 
});
 
 
/* hide the watch checkbox on LQT postings */
 
addOnloadHook(function () {
 
  var ef, labels;
 
  if (document.getElementById("lqt_method")) {
 
    ef = document.getElementById('editform'); /* narrow the search for labels */
 
    if (ef) {
 
      document.getElementById('wpMinoredit').style.display = 'none';
 
      document.getElementById('wpWatchthis').style.display = 'none';
 
      labels = ef.getElementsByTagName('label');
 
      for (var i=0; i<labels.length; ++i) {
 
        if ((labels[i].htmlFor === 'wpMinoredit') || (labels[i].htmlFor === 'wpWatchthis')) {
 
          labels[i].style.display = 'none';
 
        }
 
      }
 
    }
 
 
   }
 
   }
 
});
 
});

Revisión de 20:11 25 sep 2014

// Basado en http://wikieducator.org/User:JimTittsler/vector.js
 
importScript('Ususario:Lmorillas/googlesearch.js');
 
// reader mode for narrow screens  --> para el tablet de 7"
// should follow googlesearch.js if used
// window.weReader = true;  // force to always use reader mode, regardless of width
importScript('Usuario:Lmorillas/reader.js');
 
$(function () {
  $('#n-recentchanges').after('<li id="n-newpages"><a href="/Special:NewPages?namespace=all" title="The list of newly created pages">Páginas nuevas</a></li>');
  // gardening tool
  if (wgPageName === 'Especial:PáginasNuevas') {
    $.getScript('/extensions/WE/spam.js');
  }
  if (wgAction === 'history') {
    $.getScript('/extensions/WE/deleterevs.js');
  }
});