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

De WikiEducator
Saltar a: navegación, buscar
m (remove obsolete stream.js)
m (1 revisión: import from en.WE after update to MW 1.23+)
 
(3 revisiones intermedias por el mismo usuario no mostrado)
Línea 1: Línea 1:
 
importScript('User:JimTittsler/googlesearch.js');
 
importScript('User:JimTittsler/googlesearch.js');
//importScript('User:JimTittsler/AddThis.js');
 
 
// reader mode for narrow /
 
// should follow googlesearch.js if used
 
// window.weReader = true;  // force to always use reader mode, regardless of width
 
// window.weReaderWidth = 1024;  // max width that activates reader mode
 
// now a gadget: importScript('User:JimTittsler/reader.js');
 
  
 
$(function () {
 
$(function () {
Línea 13: Línea 6:
 
   var st = $('#pt-mytalk').attr('style');
 
   var st = $('#pt-mytalk').attr('style');
 
   st = st ? ' style="' + st + '"': '';
 
   st = st ? ' style="' + st + '"': '';
  $('#pt-mytalk')
 
    .after('<li class="pt-blog"' + st + '><a href="/User:'+wgUserName+'/Blog">Blog</a></li>')
 
    .after('<li class="pt-projects"' + st + '><a href="/User:'+wgUserName+'/Projects">Projects</a></li>')
 
    .after('<li class="pt-height"' + st + '>' + document.getElementById('content').offsetHeight + 'px</li>');
 
 
   // gardening tool
 
   // gardening tool
   if ($.inArray(wgPageName, ['Special:NewPages', 'Special:RecentChanges']) > -1) {
+
   if ((wgCanonicalNamespace === 'Special') && $.inArray(wgCanonicalSpecialPageName, ['Newpages', 'Recentchanges']) > -1) {
 
     $.getScript('/extensions/WE/spam.js');
 
     $.getScript('/extensions/WE/spam.js');
 
   }
 
   }
Línea 26: Línea 15:
 
   $('#p-coll-create_a_book li a[href*="add_article"]').parent()
 
   $('#p-coll-create_a_book li a[href*="add_article"]').parent()
 
     .after('<li><a id="t-bookmaker" title="Add the current page and its subpages" rel="nofollow" href="#">Add page &amp; subpages</a></li>');  
 
     .after('<li><a id="t-bookmaker" title="Add the current page and its subpages" rel="nofollow" href="#">Add page &amp; subpages</a></li>');  
  $('#t-bookmaker').click(function() {
 
    $.getScript('/extensions/WE/bookmaker.js');
 
    return false;
 
  });
 
 
});
 
});

Última revisión de 13:48 3 sep 2014

importScript('User:JimTittsler/googlesearch.js');
 
$(function () {
  $('#n-recentchanges').find('a:first').attr('href', '/index.php?title=Special:RecentChanges&hidebots=0');
  $('#n-recentchanges').after('<li><a href="/Special:NewPages?namespace=all" title="The list of newly created pages">New pages</a></li>');
  var st = $('#pt-mytalk').attr('style');
  st = st ? ' style="' + st + '"': '';
  // gardening tool
  if ((wgCanonicalNamespace === 'Special') && $.inArray(wgCanonicalSpecialPageName, ['Newpages', 'Recentchanges']) > -1) {
    $.getScript('/extensions/WE/spam.js');
  }
  if (wgAction === 'history') {
    $.getScript('/extensions/WE/deleterevs.js');
  }
  $('#p-coll-create_a_book li a[href*="add_article"]').parent()
    .after('<li><a id="t-bookmaker" title="Add the current page and its subpages" rel="nofollow" href="#">Add page &amp; subpages</a></li>'); 
});