User:Nekky-chan/global.js

//writeonly $(function { var qstring = (window.location.search) ? '&' : '?',    li3 = mw.html.element('li', {id: 'mca'}, new mw.html.Raw(mw.html.element('a', {href: (window.location.href).replace(/#.*/, '') + qstring + 'mcache=writeonly',}, ('writeonly'))));    $('.tools').append(li3); });

//internal stats $('.tools').append( $('').text('env: '+mw.config.get('wgWikiaEnvironment')+' | NS: '+mw.config.get('wgNamespaceNumber')+' | lang: '+mw.config.get('wgContentLanguage')+' | Id: '+mw.config.get('wgCityId')+' | db: '+mw.config.get('wgDBname') ) );

//Preview var url = location.toString; var indexOfFandom = url.search(/(\.fandom\.com)|(\.wikia\.com)|(\.wikia\.org)/); var previewURL = ""; if (indexOfFandom != -1) { previewURL = url.slice(0,indexOfFandom) + ".preview" + url.slice(indexOfFandom); previewURL = previewURL.replace("https","http"); } //add to toolbar $('#WikiaBar .toolbar .tools').append('preview');

// @DarkBarbarian $(function {   //Notifcations open on hover	$('.notifications > .wds-dropdown').mouseover(function { mw.loader.using("skin.fandomdesktop.GlobalNavigationNotifications.js").then(function(e) {			e("skin.fandomdesktop.GlobalNavigationNotifications.js").loadNotifications;			$('.notifications > .wds-dropdown').mouseenter(function { $('.notifications > .wds-dropdown').addClass('wds-is-active'); }).mouseleave(function { $('.notifications > .wds-dropdown').removeClass('wds-is-active'); });		});	}); });

// LookupUser fixes $(function {	if (mw.config.get('wgCanonicalSpecialPageName') !== 'LookupUser') return;	var prom = [];	$('div.lookup-user__table-wrapper > table > tbody > tr > td:nth-child(2) > a:first-child').each(function{ var baseUrl = $(this).text.trim; prom.push($.getJSON(baseUrl+'api.php?action=query&meta=siteinfo&sipropr=variables&format=json&callback=?')); });	Promise.allSettled(prom).then(function(res) { for (var i in res) { if (res[i].status !== 'rejected') continue; // just assume if we have an error the wiki is closed. // does not consider further in the event the wiki is *otherwise* unreachable, // possible exceptions: behind the VPN, some error state in the API, server error, etc.			$('div.lookup-user__table-wrapper > table > tbody > tr:eq('+i+') > td:nth-child(1)').wrapInner(' ').append(' Closed '); }	}); });

// soap imports mw.loader.load('//internal-soap.fandom.com/index.php?title=User:Nekky-chan/scripts-ucp.js&action=raw&ctype=text/javascript'); //GlobalNavButtons imports mw.loader.load('//dev.fandom.com/index.php?title=User:Nekky-chan/GlobalNavButtonsConf.js&action=raw&ctype=text/javascript');

importArticles({   type: 'script',    articles: [    //  'u:dev:MediaWiki:AjaxEditPreview.js',        'u:dev:MediaWiki:Bang.js',        'u:dev:MediaWiki:GlobalNavButtons.js',        'u:dev:MediaWiki:MobilePreview.js',        'u:dev:MediaWiki:OriginalImages.js',        'u:dev:MediaWiki:PortableCSSPad/code.js',        'u:dev:MediaWiki:QuickDiff/code.js',        'u:dev:MediaWiki:QuickBarPageTools.js',        'u:dev:MediaWiki:QuickPurge.js',        'u:dev:MediaWiki:ThemeToggler.js',        'u:dev:MediaWiki:View_Source/code.js',        'u:community:MediaWiki:Van-RedirectCategories.js',        'u:dev:MediaWiki:PageReport.js',    ] }); if (mw.config.get('wgContentLanguage') === 'de' && mw.config.get('wgDBname') !== 'denekkyapi') { importArticle({		type: 'style',		article: 'u:dev:MediaWiki:AutoCreateUserPages.js'	}); console.log("AutoCreateUserPages wurde geladen!"); }	else { console.log("AutoCreateUserPages wurde nicht geladen!"); } window.AutoCreateUserPagesConfig = { content: { 2: '',   },    summary: 'Skript: Benutzerseite wird automatisch erstellt', notify: false };