Diferencia entre revisiones de «Usuario:JimTittsler/vector.js»
De WikiEducator
(Página creada con 'importScript('User:JimTittsler/googlesearch.js'); $(function () { $('#n-recentchanges').after('<li><a href="/Special:NewPages?namespace=all" title="The list of newly created …') |
(trigger gardening tools on some pages) |
||
Línea 7: | Línea 7: | ||
.after('<li><a href="/User:'+wgUserName+'/Projects">My projects</a></li>') | .after('<li><a href="/User:'+wgUserName+'/Projects">My projects</a></li>') | ||
.after('<li>' + document.getElementById('content').offsetHeight + 'px</li>'); | .after('<li>' + document.getElementById('content').offsetHeight + 'px</li>'); | ||
+ | // gardening tool | ||
+ | if (wgPageName === 'Especial:PáginasNuevas') { | ||
+ | $.getScript('/skins/common/we/spam.js'); | ||
+ | } | ||
+ | if (wgAction === 'history') { | ||
+ | $.getScript('/skins/common/we/deleterevs.js'); | ||
+ | } | ||
}); | }); | ||
Revisión de 10:20 19 dic 2011
importScript('User:JimTittsler/googlesearch.js'); $(function () { $('#n-recentchanges').after('<li><a href="/Special:NewPages?namespace=all" title="The list of newly created pages">New pages</a></li>'); $('#pt-mytalk') .after('<li><a href="/User:'+wgUserName+'/Blog">My blog</a></li>') .after('<li><a href="/User:'+wgUserName+'/Projects">My projects</a></li>') .after('<li>' + document.getElementById('content').offsetHeight + 'px</li>'); // gardening tool if (wgPageName === 'Especial:PáginasNuevas') { $.getScript('/skins/common/we/spam.js'); } if (wgAction === 'history') { $.getScript('/skins/common/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 () { if (document.getElementById("lqt_method")) { var 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'; } } } } });