MediaWiki:Common.js: Difference between revisions
m (Applying changes that should make this JS file partially HTTPS-ready. If you have any questions or noticed issues related to this edit, please reach out to us using the Special:Contact page.) |
SlyAceZeta (talk | contribs) (removing AjaxRC (superseded by core MW functionality) and UserTags (use was minimal); adding InputUsername to replace custom code; updating Tooltips for UCP) |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
// dev:InputUsername |
|||
window.ajaxPages = ["Special:RecentChanges","Special:Watchlist","Special:Log","Special:Contributions"]; |
|||
window.UsernameReplaceSelector = 'span.insertusername'; |
|||
window.ajaxIndicator = 'https://vignette.wikia.nocookie.net/subnautica/images/d/de/Ajax-loader.gif'; |
|||
window.ajaxRefresh = 30000; |
|||
// dev:Tooltips |
|||
window.AjaxRCRefreshText = 'Auto-refresh'; |
|||
⚫ | |||
window.AjaxRCRefreshHoverText = 'Automatically refresh the page'; |
|||
⚫ | |||
⚫ | |||
classname: 'fauna-tooltip', |
|||
modules: {}, |
|||
parse: '{' + '{FaunaTable/<#fauna#>}}' |
|||
⚫ | |||
}, |
|||
rollback: { u: 'Rollback', order: 100 } |
|||
{ |
|||
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#>}}' |
|||
} |
} |
||
]; |
|||
UserTagsJS.modules.custom = { |
|||
'Mesmerized': ['rollback'], |
|||
'MorphGuy': ['rollback'], |
|||
'Squidy_Frykas': ['rollback'], |
|||
}; |
|||
$(function() { |
|||
if (window.disableUsernameReplace || mw.config.get('wgUserName') === null) { return; } |
|||
$('span.insertusername').text(mw.config.get('wgUserName')); |
|||
}); |
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#>}}'
}
];