Account Navigation Links

From C.Syde's Wiki, an all-subject wiki that anyone can edit!
Jump to navigation Jump to search

The Account Navigation is a script which was previously used on The Sims Wiki until late 2016. It is unknown who the original creator of the script is, as the script has been adapted by various users on various wikis. The script has not officially been published on the Fandom Developers Wiki or any wikis officially, but it is one of the first scripts to be used on C.Syde's Wiki, having been a sitewide extension since December 2014. This version of the script adds the following links to your account navigation dropdown:



Sitewide System for Non-Sitewide Features on C.Syde's Wiki

Sadly the script had to be removed sitewide in June 2017, due to customisation policy restrictions, so it has to be added to your fandomdesktop.js, for those of you who benefited from sitewide use of this script, and/or want to continue using it for this wiki, after permitted sitewide use of the script was sadly withdrawn. To enable the script, you must add the following to your fandomdesktop.js page:

An example of what the account navigation dropdown of C.Syde's Wiki looks like with the blog and watchlist links added, and with WikiaNavigationBarStyle enabled
// <nowiki>
//Add extra AccountNav options
/*
 */
;(function() {
    if (navLinks) return;
    var user = mw.util.wikiUrlencode(mw.config.get('wgUserName')),
        links = {
        watchlist: {
            text: 'My Watchlist',
            url: '/wiki/Special:Watchlist'        	
        },
        blogs: {
            text: 'My Blogs',
            url: '/wiki/Special:Myblog'
        }
    },
        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('.global-navigation__bottom > .wds-dropdown > .wds-dropdown__content > ul.wds-list > li:nth-child(2)').insertAdjacentHTML('afterEnd', html);
})();
//
// </nowiki>


Loading comments...