User:AndreMor/global.js

$('head').append('');

window.announcementsIgnore = { option: 'opt-out-all', exceptWikiIds: [ 6626,       177,        3487    ] };

window.globalNavButtons = [ {   text: 'Wubbzypedia', url: 'https://wubbzy.fandom.com', isMain: true, whoIsMain: false, shortName: 'wp' }, {    text: 'Spanish version', url: 'https://wubbzy.fandom.com/es', isMain: false, whoIsMain: 'wp', shortName: 'eswp' }, {    text: 'User page', url: 'https://wubbzy.fandom.com/User:AndreMor', isMain: false, whoIsMain: 'wp', shortName: 'up' }, {    text: 'Home', url: 'https://wubbzy.fandom.com/Wubbzypedia', isMain: false, whoIsMain: 'wp', shortName: 'home' }, {    text: 'Recent changes', url: 'https://wubbzy.fandom.com/Special:RecentChanges', isMain: false, whoIsMain: 'wp', shortName: 'rc' }, {    text: 'Admin Dashboard', url: 'https://wubbzy.fandom.com/Special:AdminDashboard', isMain: false, whoIsMain: 'wp', shortName: 'ad' }, {    text: 'Community CSS', url: 'https://wubbzy.fandom.com/MediaWiki:Wikia.css', isMain: false, whoIsMain: 'wp', shortName: 'css' }, {    text: 'ImportJS', url: 'https://wubbzy.fandom.com/MediaWiki:ImportJS', isMain: false, whoIsMain: 'wp', shortName: 'imjs' }, {    text: 'Community JS', url: 'https://wubbzy.fandom.com/MediaWiki:Common.js', isMain: false, whoIsMain: 'wp', shortName: 'js' }, {    text: 'Other Wikis', url: '', isMain: true, whoIsMain: false, shortName: 'ow' }, {    text: 'The Wubb Club', url: 'https://wubbzyfanon.fandom.com', isMain: false, whoIsMain: 'ow', shortName: 'twc' }, {    text: 'Community Central', url: 'https://community.fandom.com', isMain: false, whoIsMain: 'ow', shortName: 'cc' }, {    text: 'Community Central (Spanish)', url: 'https://comunidad.fandom.com', isMain: false, whoIsMain: 'ow', shortName: 'cs' }, {    text: 'Dev Wiki', url: 'https://dev.fandom.com', isMain: false, whoIsMain: 'ow', shortName: 'dev' }, {    text: 'Galaxy Life Wiki', url: 'https://galaxylife.fandom.com', isMain: false, whoIsMain: 'ow', shortName: 'gl' } ];

if (mw.config.get("wgUserGroups").indexOf('sysop') > -1) { importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:AnalyticsShortcut.js',    ] }); }

importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:MobileEditor.js',        'u:dev:MediaWiki:PortableCSSPad/code.js',        'u:dev:MediaWiki:GlobalNavButtons.js',        'u:dev:MediaWiki:MercuryPreview/code.js',        'u:dev:MediaWiki:AnnouncementsIgnore.js',        'u:dev:MediaWiki:MinimalTemplateClassification.js',        'u:dev:MediaWiki:WhatLinksHere/code.js',        'u:dev:MediaWiki:RandomPageShortcut/code.js',        'u:dev:MediaWiki:UnhideUserMasthead/code.js',        'u:dev:MediaWiki:DisplayTimer/code.js',        'u:dev:MediaWiki:NullEditButton/code.js',    ] });

var sassParams = mw.config.get('wgSassParams'); var root = document.documentElement; if (window.AuroraOverwriteTransparency === true) { root.style.setProperty('--page-background-color', sassParams['color-page']); root.style.setProperty('--page-opacity', '0.5'); } else { root.style.setProperty('--page-background-color', sassParams['color-page']); root.style.setProperty('--page-opacity', sassParams['page-opacity'] + '%'); } ExcludeAuroraWikis= window.ExcludeAuroraWikis || []; AuroraOnlyWikis= window.AuroraOnlyWikis || [];

if(window.ExcludeAuroraWikis.includes(wgServer.replace(/\.[^]*?$/,).replace(/^(.*[\\\/])/,)) === true ){ console.log('Aurora Not Loaded: Wiki is in the exclude Aurora array!') } else if(window.AuroraOnlyWikis){ if(window.AuroraOnlyWikis.includes(wgServer.replace(/\.[^]*?$/,).replace(/^(.*[\\\/])/,)) === true || window.AuroraOnlyWikis.includes('official') && (wgCityId == 177 || wgCityId == 1779 || wgCityId == 3487 || wgCityId == 3083 || wgCityId == 100619 || wgCityId == 5377 || wgCityId == 81390 || wgCityId == 49972 || wgCityId == 1090888 || wgCityId == 10261 || wgCityId == 11250 || wgCityId == 10466 || wgCityId == 3439 || wgCityId == 10465 || wgCityId == 1686 || wgCityId == 3321 || wgCityId == 791363 || wgCityId == 423369 || wgCityId == 7931 || wgCityId == 1610766 || wgCityId == 4079 || wgCityId == 65099 || wgCityId == 1634335 || wgCityId == 193260 || wgCityId == 1233861 || wgCityId == 1230494 || wgCityId == 1267502 || wgCityId == 14379)){ console.log('Aurora Loaded') importArticles({   type: "style",    article: "u:dev:MediaWiki:AuroraTheme.css" }); }else{ console.log('Aurora Not Loaded: Aurora is set to only load on specific wikis.') } } else { console.log('Aurora Loaded') importArticles({   type: "style",    article: "u:dev:MediaWiki:AuroraTheme.css" }); } //To test once UCP allows JS - DO NOT USE THIS YET! if(window.EnableAuroraUCPTesting === true && mw.config.get('wgCityId') == 2182188){ console.log('Aurora Loaded - Aurora is set to UCP testing.') importArticles({   type: "style",    article: "u:dev:MediaWiki:AuroraTheme.css" }); }