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

De WikiEducator
Saltar a: navegación, buscar
(update path to spam fighting tools)
Línea 12: Línea 12:
 
   // gardening tool
 
   // gardening tool
 
   if (wgPageName === 'Especial:PáginasNuevas') {
 
   if (wgPageName === 'Especial:PáginasNuevas') {
     $.getScript('/skins/common/we/spam.js');
+
     $.getScript('/extensions/WE/spam.js');
 
   }
 
   }
 
   if (wgAction === 'history') {
 
   if (wgAction === 'history') {
     $.getScript('/skins/common/we/deleterevs.js');
+
     $.getScript('/extensions/WE/deleterevs.js');
 
   }
 
   }
 
});
 
});

Revisión de 20:10 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');
  }
});
 
 
 
 
 
/* 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';
        }
      }
    }
  }
});