FANDOM


//
// Talk page button
// Created by Lil' Miss Rarity
// MIT OS License
$(function() {
    var config = mw.config.get([
        'skin',
        'wgFormattedNamespaces',
        'wgNamespaceNumber',
        'wgPageName'
    ]);
 
    if (config.wgNamespaceNumber !== 0 || config.skin !== 'oasis' || window.TalkButtonLoaded) {
        return;
    }
    window.TalkButtonLoaded = false;
 
    $.get(mw.util.wikiScript('api'), {
        action: 'query',
        format: 'json',
        meta: 'allmessages',
        ammessages: 'oasis-page-header-talk'
    }, function(d) {
        var talkMessage = d.query.allmessages[0]['*'];
        $('<li>' +
            '<a id="ca-talk" class="TalkButtonBubble" href="/wiki/Talk:' + mw.html.escape(config.wgPageName) + '">' +
                talkMessage +
            '</a>' +
        '</li>')
.appendTo('.page-header__contribution-buttons .wds-list'); 
 
        $.ajax({
            type: 'GET',
            url: mw.util.wikiScript('api'),
            data: {
                titles: config.wgFormattedNamespaces[1] + ':' + config.wgPageName,
                action: 'query',
                format: 'json',
                prop: 'info',
                inprop: 'revcount'
            }
        }).always(function(data) {
            var pageData = data.query && data.query.pages[Object.keys(data.query.pages)[0]];
            $('.TalkButtonBubble').text(talkMessage + ' (' + (pageData && pageData.revcount || 0) + ')');
        });
    });
 
    // ZION loader directive
    if (window.ZION !== undefined) window.ZION.loaded.fire();
});
//

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.