FANDOM


//
// loader:
;(function(a,b,d){function c(){var f=d.config.get("wgUserName"),g="u:preferences:",h=g+"MediaWiki:",e=[g+"User:"+f+"/preferences.js",h+"Preferences.js"];if(d.config.get("wgCanonicalNamespace")==="Special"&&d.config.get("wgTitle")==="Scripts"){e.unshift(h+"Special.js")}b.getScript("/load.php?debug=false&mode=articles&only=scripts&articles="+e.join("|"));a.defer=b.Deferred();b(function(){b('<iframe id="pref-server" src="//preferences.wikia.com/wiki/MediaWiki:Server1?action=render" style="display:none;"></iframe>').appendTo(document.body).on("load",function(){a.defer.resolve()})});a.promises=[];var i=function(j){this.addon=j;this.queue=[]};b.each(["main","form","update","post","fail"],function(j,k){i.prototype[k]=function(m,l){this.queue.push({type:k,arg1:m,arg2:l});return this}});a.addon=function(j){var k=new i(j);a.promises.push(k);return k}}if(window.postMessage&&window.JSON&&!a.addon){c()}}((window.dev=window.dev||{}).preferences=window.dev.preferences||{},jQuery,mediaWiki));
 
$(function () {
    if (mw.config.get('wgAction') === 'view') {
 
        var user = mw.config.get('wgUserName'), content = $('#mw-content-text'),
            users = ['Pecoes', 'Xëphnid', 'Lunarity', 'Mathmagician', 'Kangaroopower'],
            languages;
 
        preparePage();
 
        if ($.inArray(user, users) === -1) users.unshift(user);
 
        dev.preferences.addon('SharedDemo')
        .main(users, function (data) {
            for (var i = 0; i < users.length; i++) {
                languages = [];
                $.each(
                    data.shared(users[i]).get('languages', {}), 
                    function (code, level) {
                        languages.push(code.toUpperCase() + '-' + level);
                    }
                );
                addFieldset(users[i])
                .append(languages.join(', '));
            }
        });
    }
 
    function preparePage () {
        content.empty().append(
        '<a class="source" href="//pecoes.wikia.com/wiki/SharedDemo.js?action=raw&ctype=text/css">' +
            'view source of this page' +
        '</a>');
        mw.util.addCSS('#mw-content-text .source {' +
            'margin-top: 25px; display: block; text-align: center;' +
        '} #mw-content-text fieldset {' +
            'padding: 10px 0; margin: 15px auto;' +
        '} #mw-content-text fieldset legend {' +
            'margin-left: 60px;' +
        '} #mw-content-text fieldset div{' +
            'display: block; margin: 0 auto; padding: 4px; width: 550px; font-size: 125%;' +
        '} #mw-content-text fieldset a {' +
            'display: block; margin: 4px 60px; text-align: right;' +
        '}');
    }
 
    function addFieldset (name) {
        return $(
        '<fieldset>' +
            '<legend>Language preferences of ' + name + '</legend>' +
            '<div></div>' +
            '<a href="http://preferences.wikia.com/wiki/User:' + name + '/shared.js?action=raw&ctype=text/css">view</a>' +
        '</fieldset>')
        .appendTo(content)
        .find('div');
    }
});
//

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.