MediaWiki:Gadget-toplinksDropdown.js
Jump to navigation
Jump to search
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
1 /**
2 * De-clutters the personal links at the top by collecting them in a dropdown,
3 * opened by hovering over your username - inspired by the Timeless skin
4 *
5 * @author Iiii_I_I_I
6 */
7
8 $(function() {
9 var $talk = $('#pt-mytalk'),
10 $contris = $('#pt-mycontris'),
11 $watchlist = $('#pt-watchlist'),
12 $prefs = $('#pt-preferences'),
13 $logout = $('#pt-logout');
14
15 // new talk page message
16 $('#pt-mytalk .mw-echo-alert').text('Talk');
17 // create dropdown
18 $('<div>')
19 .addClass('pt-userpage-dropdown')
20 .append(
21 $('<ul>')
22 .append(
23 $talk,
24 $contris,
25 $watchlist,
26 $prefs,
27 $logout
28 )
29 )
30 .appendTo('#pt-userpage');
31 });