User:C.Syde65/wikia.js
Important note on account security
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with
importScript
or iusc
, take note that this causes you to dynamically load a remote script, which could be changed by others. The code will be executed when you preview this page.Note: After saving, 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: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Edge: Press Ctrl-Shift-Del, select Cached data and files, and click Clear
- Opera: Go to Menu → Settings (Opera → Preferences on a Mac) and then to Privacy & security → Clear browsing data → Cached images and files.
// 08:33, May 10, 2017 (UTC)
// <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');