User:Equazcion/SidebarHistoryToolsBeta.js

if (wgNamespaceNumber != -1) { // Serves no purpose on Special pages

// Create our History tools group by cloning the sidebar's existing Toolbox, insert the clone after Toolbox. // Then add new 'histtools' class for referencing, remove cloned ID, and set its title (by finding/changing the  element within). var toolboxClone =        $('#p-tb').clone(true).insertAfter($('#p-tb')).addClass('histtools').removeAttr('id').find('h3').text('History tools');

// Clear all links cloned with the Toolbox, except the first (:gt(#) selector returns all after the #). // When adding and removing links, we work with the list items (), which each contain a link. $('.histtools li').remove;

$('.histtools .body ul').append(''); $('.histtools .body ul').append(''); $('.histtools .body ul').append(''); $('.histtools .body ul').append('</a></li>'); $('.histtools .body ul').append('<li><a class="histTool5"></a></li>'); $('.histtools .body ul').append('<li><a class="histTool6"></a></li>'); $('.histtools .body ul').append('<li><a class="histTool7"></a></li>'); $('.histtools .body ul').append('<li><a class="histTool8"></a></li>');

$('.histTool1').text('Page information').attr('href', 'http://en.wikipedia.org/w/index.php?title=' + wgPageName + '&action=info'); $('.histTool2').text('Page logs').attr('href', 'http://en.wikipedia.org/w/index.php?title=Special:Log&page=' + wgPageName); $('.histTool3').text('Contributors').attr('href', 'http://toolserver.org/~daniel/WikiSense/Contributors.php?wikilang=en&wikifam=.wikipedia.org&grouped=on&page=' + wgPageName); $('.histTool4').text('User edits').attr('href', 'http://toolserver.org/~snottywong/usersearch.html?page=' + wgPageName); $('.histTool5').text('Watchers').attr('href', 'http://toolserver.org/~dispenser/cgi-bin/watcher.py?page=' + wgPageName); $('.histTool6').text('Page view stats').attr('href', 'http://stats.grok.se/en/latest/' + wgPageName); $('.histTool7').text('History stats').attr('href', 'http://toolserver.org/~tparis/articleinfo/index.php?article=' + wgPageName + '&lang=en&wiki=wikipedia'); $('.histTool8').text('History search').attr('href', 'http://wikipedia.ramselehof.de/wikiblame.php?lang=en&article=' + wgPageName); }