Community Central
Community Central
mNo edit summary
Tag: sourceedit
mNo edit summary
Tag: sourceedit
Line 39: Line 39:
 
$(this).attr('target', '_blank');
 
$(this).attr('target', '_blank');
 
});
 
});
  +
if ($('#WikiaRail').length) {
  +
$('#WikiaRail').on('DOMNodeInserted', function() {
  +
$(this).removeClass('wikia-rail');
  +
});
  +
}
   
 
// Custom edit buttons
 
// Custom edit buttons

Revision as of 13:54, 31 March 2015

// Chat Hacks
importScriptPage('User:Monchoman45/ChatHacks.js', 'c');
importScriptPage('User:Joeytje50/ChatPMs.js', 'c');

// AjaxRC
if (mw.config.get('wgCanonicalSpecialPageName') == 'WikiActivity') {
    mw.util.addCSS(
        '#ajaxRefresh {' +
            'position: absolute;' +
            'right: 0;' +
            'bottom: 10px;' +
        '}' +
        '#ajaxLoadProgress {' +
            'margin-left:5px;' +
        '}'
    );
}
window.ajaxCallAgain = window.ajaxCallAgain || [];
window.ajaxCallAgain.push(function() {
    $('.rc-conntent')
        .find('a')
        .each(function() {
            $(this).attr('target', '_blank');
        });
});
window.ajaxPages = ['Special:RecentChanges', 'Special:WikiActivity'],
window.ajaxRefresh = 30000;

// Misc.
$('.start-wikia')
    .attr('href', '/wiki/' + mw.config.get('wgPageName') + '?useskin=monobook')
    .find('span').html('Monobook');
$('[data-canonical="wikiactivity"]')
    .attr('href', '/wiki/Special:RecentChanges')
    .html('Recent Changes');
$('.rc-conntent')
    .find('a')
    .each(function() {
        $(this).attr('target', '_blank');
    });
if ($('#WikiaRail').length) {
    $('#WikiaRail').on('DOMNodeInserted', function() {
        $(this).removeClass('wikia-rail');
    });
}

// Custom edit buttons
if (mw.toolbar) {
    mw.toolbar.addButton(
        'http://static1.wikia.nocookie.net/__cb20070329064845/central/images/2/23/Button_code.png',
        'Code',
        '<code><nowiki>',
        '</nowiki></code>',
        '',
        'mw-editbutton-code'
    );
}

// Imports
importArticles({
    type: 'script',
    articles: [
        'u:dev:AjaxRC/code.js',              // AjaxRC
        'u:dev:PersistentParameters/code.js' // Persistent Parameters
    ]
});