User:Canadabonk/common.js: Difference between revisions
Content deleted Content added
Canadabonk (talk | contribs) No edit summary |
Canadabonk (talk | contribs) No edit summary |
||
Line 232: | Line 232: | ||
toolbar.append('<li id="ct-toolbar-pagetools" class="toolbar-dropup">Page tools<ul></ul></li>'); |
toolbar.append('<li id="ct-toolbar-pagetools" class="toolbar-dropup">Page tools<ul></ul></li>'); |
||
toolbar.append('<li id="ct-toolbar-usertools" class="toolbar-dropup">User tools<ul></ul></li>'); |
if ($('body').is('.ns-2')) {toolbar.append('<li id="ct-toolbar-usertools" class="toolbar-dropup">User tools<ul></ul></li>');} |
||
toolbar.find('#t-whatlinkshere, #t-recentchangeslinked, #t-print, #t-permalink, #t-info, #t-cite, #t-urlshortener, #t-createredirect').appendTo('#ct-toolbar-pagetools > ul'); |
toolbar.find('#t-whatlinkshere, #t-recentchangeslinked, #t-print, #t-permalink, #t-info, #t-cite, #t-urlshortener, #t-createredirect').appendTo('#ct-toolbar-pagetools > ul'); |
||
Line 239: | Line 239: | ||
$('#ct-toolbar-pagetools > ul, #ct-toolbar-usertools > ul').hide(); |
$('#ct-toolbar-pagetools > ul, #ct-toolbar-usertools > ul').hide(); |
||
$('#ct-toolbar-pagetools').click(toolbarDropup); |
$('#ct-toolbar-pagetools, #ct-toolbar-usertools').click(toolbarDropup); |
||
$('#ct-toolbar-usertools').click(toolbarDropup); |
|||
function toolbarDropup() { |
function toolbarDropup() { |
||
$(this).toggleClass('active'); |
$(this).toggleClass('active'); |
||
if ($(this).is('.active')) { |
if ($(this).is('.active')) { |
||
$(this).find('ul').show(); |
$(this).find('ul').show(); |