User:C.Syde65/wikia.js: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
imported>C.Syde65 No edit summary |
imported>C.Syde65 (Importing through global.js instead.) |
||
Line 1: | Line 1: | ||
// 08: |
// 08:37, May 30, 2019 (UTC) |
||
// <source lang="JavaScript"> |
// <source lang="JavaScript"> |
||
//Add extra AccountNav options |
|||
/* |
|||
*/ |
|||
;(function() { |
|||
if (navLinks) return; |
|||
var user = mw.util.wikiUrlencode(mw.config.get('wgUserName')), |
|||
links = { |
|||
contribs: { |
|||
text: 'My Contributions', |
|||
url: '/wiki/Special:Mycontributions' |
|||
}, |
|||
blogs: { |
|||
text: 'My Blogs', |
|||
url: '/wiki/User_blog:' + user |
|||
}, |
|||
watchlist: { |
|||
text: 'My Watchlist', |
|||
url: '/wiki/Special:Watchlist' |
|||
}, |
|||
followed: { |
|||
text: 'My Followed Pages', |
|||
url: '/wiki/Special:Following' |
|||
} |
|||
}, |
|||
html = '', |
|||
navLinks = true; |
|||
for (var i in links) { |
|||
html += '<li><a href="' + links[i].url + '" class="wds-global-navigation__dropdown-link">' + links[i].text + '</a></li>'; |
|||
} |
|||
document.querySelector('.wds-global-navigation__user-menu .wds-list > li:nth-child(2)').insertAdjacentHTML('afterEnd', html); |
|||
})(); |
|||
importScriptPage('MediaWiki:ClassicModIcons.js', 'dev'); |
importScriptPage('MediaWiki:ClassicModIcons.js', 'dev'); |