MediaWiki:Common.js: Difference between revisions

From Subnautica Wiki
No edit summary
(removing AjaxRC (superseded by core MW functionality) and UserTags (use was minimal); adding InputUsername to replace custom code; updating Tooltips for UCP)
 
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
// dev:InputUsername
window.ajaxPages = ["Special:RecentChanges","Special:Watchlist","Special:Log","Special:Contributions"];
window.UsernameReplaceSelector = 'span.insertusername';
window.ajaxIndicator = 'http://vignette1.wikia.nocookie.net/subnautica/images/d/de/Ajax-loader.gif';
window.ajaxRefresh = 30000;
window.AjaxRCRefreshText = 'Auto-refresh';
window.AjaxRCRefreshHoverText = 'Automatically refresh the page';
window.UserTagsJS = {
modules: {},
tags: {
rollback: { u: 'Rollback', order: 100 }
}
};
UserTagsJS.modules.custom = {
'ChrisFo': ['rollback'];
'Mesmerized': ['rollback'];
'MorphGuy': ['rollback'];
};
// Background Test


// dev:Tooltips
// You can change this values.
window.tooltips_list = [
var bg_color = '#000',
{
bg_size = 'cover',
classname: 'fauna-tooltip',
bg_attachment = 'fixed',
parse: '{' + '{FaunaTable/<#fauna#>}}'
bg_repeat = 'no-repeat';
},
// This is the important part
{
switch (mw.config.get('wgPageName')) {
classname: 'flora-tooltip',
case "Bulb Zone":
parse: '{' + '{FloraTable/<#flora#>}}'
// Backgrounds for page "Name1"
},
var bgrandom_list = ["Community image 1395684116.jpg"];
break;
{
classname: 'coral-tooltip',
}
parse: '{' + '{CoralTable/<#coral#>}}'
// Import always after you declare your variables or in MediaWiki:ImportJS
},
importArticles({
type: 'script',
{
classname: 'clade-tooltip',
articles: [
'u:dev:RandomBackground/code.js'
parse: '{' + '{CladeInfo/<#info#>}}'
]
},
{
});
classname: 'databank-tooltip',
parse: '{' + '{Databank2|<#info#>}}'
},
{
classname: 'biome-tooltip',
parse: '{' + '{BiomeTable/<#biome#>}}'
}
];

Latest revision as of 00:54, 29 January 2022

// dev:InputUsername
window.UsernameReplaceSelector = 'span.insertusername';

// dev:Tooltips
window.tooltips_list = [
    {
        classname: 'fauna-tooltip',
        parse: '{' + '{FaunaTable/<#fauna#>}}'
    },
    {
        classname: 'flora-tooltip',
        parse: '{' + '{FloraTable/<#flora#>}}'
    },
    {
        classname: 'coral-tooltip',
        parse: '{' + '{CoralTable/<#coral#>}}'
    },
    {
        classname: 'clade-tooltip',
        parse: '{' + '{CladeInfo/<#info#>}}'
    },
    {
        classname: 'databank-tooltip',
        parse: '{' + '{Databank2|<#info#>}}'
    },
    {
        classname: 'biome-tooltip',
        parse: '{' + '{BiomeTable/<#biome#>}}'
    }
];