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

De WikiEducator
Saltar a: navegación, buscar
m (did someone change the case of things just to make it difficult?)
m (remove obsolete stream.js)
(2 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 6: Línea 13:
 
   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 ((wgCanonicalNamespace === 'Special') && $.inArray(wgCanonicalSpecialPageName, ['Newpages', 'Recentchanges']) > -1) {
+
   if ($.inArray(wgPageName, ['Special:NewPages', 'Special:RecentChanges']) > -1) {
 
     $.getScript('/extensions/WE/spam.js');
 
     $.getScript('/extensions/WE/spam.js');
 
   }
 
   }
Línea 15: Línea 26:
 
   $('#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;
 +
  });
 
});
 
});

Revisión de 21:20 2 sep 2014

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 () {
  $('#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 + '"': '';
  $('#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
  if ($.inArray(wgPageName, ['Special:NewPages', 'Special: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>'); 
  $('#t-bookmaker').click(function() {
    $.getScript('/extensions/WE/bookmaker.js');
    return false;
  });
});