User:C.Syde65/wikia.js: Difference between revisions

From The Sims Wiki, a collaborative database for The Sims series
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:33, May 10, 2017 (UTC)
// 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');

Latest revision as of 08:37, 30 May 2019

// 08:37, May 30, 2019 (UTC)
// <source lang="JavaScript">

importScriptPage('MediaWiki:ClassicModIcons.js', 'dev');