Diferencia entre revisiones de «Usuario:JimTittsler/vector.js»
De WikiEducator
(trigger gardening tools on some pages) |
m (remove obsolete stream.js) |
||
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 () { | ||
+ | $('#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>'); | $('#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') | $('#pt-mytalk') | ||
− | .after('<li><a href="/User:'+wgUserName+'/Blog"> | + | .after('<li class="pt-blog"' + st + '><a href="/User:'+wgUserName+'/Blog">Blog</a></li>') |
− | .after('<li><a href="/User:'+wgUserName+'/Projects"> | + | .after('<li class="pt-projects"' + st + '><a href="/User:'+wgUserName+'/Projects">Projects</a></li>') |
− | .after('<li>' + document.getElementById('content').offsetHeight + 'px</li>'); | + | .after('<li class="pt-height"' + st + '>' + document.getElementById('content').offsetHeight + 'px</li>'); |
// gardening tool | // gardening tool | ||
− | if (wgPageName | + | if ($.inArray(wgPageName, ['Special:NewPages', 'Special:RecentChanges']) > -1) { |
− | $.getScript('/ | + | $.getScript('/extensions/WE/spam.js'); |
} | } | ||
if (wgAction === 'history') { | if (wgAction === 'history') { | ||
− | $.getScript('/ | + | $.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 & 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 & subpages</a></li>'); $('#t-bookmaker').click(function() { $.getScript('/extensions/WE/bookmaker.js'); return false; }); });