User:RainA/global.js

importScriptURI('http://internal-community.wikia.com/index.php?title=MediaWiki:ChatConnect.2.js&action=raw&ctype=text/javascript');

// Imports importScriptPage('MediaWiki:PortableCSSPad/code.js', 'dev');           // PortableCSSPad importScriptPage('MediaWiki:WHAM/code.2.js', 'dev');                   // WHAM! importScriptPage('MediaWiki:MassRenameRevert/code.js', 'dev');         // MassRenameRevert importScriptPage('MediaWiki:NullEditButton/code.js', 'dev');           // NullEditButton importScriptPage("MediaWiki:FileUsageAuto-update/code.js", "dev");     // FileUsageAuto-update importScriptPage("MediaWiki:QuickContribs/code.js", "dev");            // QuickContribs importScriptPage('MediaWiki:ViewRemovedAlways/code.js', 'dev');        // ViewRemovedAlways importScriptPage('MediaWiki:ListFiles/code.js', 'dev');                // ListFiles importScriptPage('MediaWiki:FindAndReplace/code.js', 'dev');           // FindAndReplace importScriptPage('MediaWiki:ChatHacks.js', 'dev');                     // ChatHacks importScriptPage('MediaWiki:HideRail/code.js', 'dev');                 // HideRail importScriptPage('MediaWiki:RedirectManagement/code.js', 'dev');       // Redirect managment importScriptPage('MediaWiki:SkinSwitchButton/code.js', 'dev');         // SkinSwitch importScriptPage('MediaWiki:VSTFReport/code.js', 'kocka');             // Faster report importScriptPage('MediaWiki:AjaxDiff/code.js', 'dev');                 // AjaxDiff importScriptPage('MediaWiki:AjaxUndo/code.js', 'dev');                 // AjaxUndo importScriptPage('MediaWiki:CategoryRenameAuto-update/code.js', 'dev'); // CategoryRenameAuto-update importScriptPage('MediaWiki:DupImageList/code.js', 'dev');             // DupImageList importScriptPage('MediaWiki:MultiUpload/code.js', 'dev');              // MultiUpload importScriptPage('MediaWiki:PurgeButton/code.js', 'dev');              // PurgeButton importScriptPage('MediaWiki:RecentChangesMultiple/code.js', 'dev');    // RecentChangesMultiple importScriptPage('MediaWiki:RevealAnonIP/code.js', 'dev');             // RevealAnonIP importScriptPage('MediaWiki:TopEditors/code.js', 'dev');               // TopEditors importScriptPage('MediaWiki:Benutzerseiten.js', 'de.rain');            // Benutzerseiten importScriptPage('MediaWiki:FastDelete.js', 'de.rain');                // FastDelete importScriptPage("MediaWiki:PageRenameAuto-update/code.js", "dev");    // PageRenameAuto-update importScriptPage('QuickComments/code.js', 'dev');                      // QuickComments importScriptPage('User:AmonFatalis/ShowUserGroupsFork.js', 'c');       // Usergroups importScriptPage('MediaWiki:TabKeyInserter/code.js', 'dev');           // TabKeyInserter importScriptPage('MediaWiki:AjaxEmoticons/code.js', 'dev');            // AjaxEmoticons importScriptPage('AjaxThreadUnfollow/code.js', 'dev');                 // AjaxThreadUnfollow importScriptPage('ChatCount/code', 'korniux');                         // Chat Count importScriptPage("MediaWiki:PageMakerPro/code.js", "dev");		       // PageMakerPro importScriptPage("MediaWiki:OldWindowTitles.js", "de.trollocool");		// OldWindowTitles importScriptPage("AdminDashboard JS-Button/code.js", "dev");		   // JS-Button // LastEdit importArticles( {   type: 'script',    articles: [        'u:dev:MediaWiki:LastEdited/code.js',    ] } ); window.lastEdited = { avatar: true, position: 'top', size: true, diff: true, comment: true, lang: 'de', time: true }; // AjaxRC window.ajaxRefresh = 30000; window.ajaxPages = ["Special:RecentChanges","Special:WikiActivity","Special:Watchlist","Special:Log","Special:Contributions","Spezial:Letzte_Änderungen","Spezial:WikiActivity" ,"Spezial:Beiträge"]; importScriptPage('MediaWiki:AjaxRC/code.js', 'dev'); //Custom Edit Buttons by AmonFatalis if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "https://upload.wikimedia.org/wikipedia/en/c/c8/Button_redirect.png", "speedTip": "Weiterleitung", "tagOpen": "#REDIRECT ",   "tagClose": "", "sampleText": "R" }; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "https://upload.wikimedia.org/wikipedia/commons/0/05/Button_Anf%C3%BChrung.png", "speedTip": "Anführungszeichen", "tagOpen": "„", "tagClose": "“", "sampleText": "M" }; } //NoImageLightbox window.NoImageLightbox = { novideo: true }; importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:NoImageLightbox/code.js',        //'u:de.disney:MediaWiki:Gadget-HotCat.js'    ] }); //Highlight whitespace characters in diffs when they're the only thing in the change //Winner of most conspicuous missing feature for five consecutive years if (window.location.href.indexOf('diff=') !== -1) { $('.diffchange-inline').each(function {       if (!(new RegExp('\\S+').test($(this).text))) {            $(this).css('background-color', 'red');        }    }); } //end /* Makes edit count on user page link to Special:Editcount - Credit to User:452 */ if ($("#UserProfileMasthead").size) $("#UserProfileMasthead .tally em").wrap($("").attr("href", "/Special:Editcount/"+$("#UserProfileMasthead h1[itemprop=name]").html));

// Zusammenfassung für defekte Weiterleitungen if (mw.config.get('wgAction') == "delete" && $('#wpReason').val.slice(0,23) == 'content was: \"#REDIRECT' ) $('#wpReason').val('Defekte Weiterleitung'); // Versionsgeschichte-Button bei Diffs if ($('strong:contains("Changes:")').length)  $('#WikiaPageHeader').find('p').children('a').after(' (Versionsgeschichte)');  //Zusammenfassungen window.dev = window.dev || {}; window.dev.editSummaries = {    css: false,    select: [        '(Wählen)',        'Standard', [            'Neuer Artikel',            'typo',            'Korrektur',            'Ergänzt',            'Erweitert',            '+Interwiki',            'Aktualisiert',            'Aufgeräumt',            'Format korrigiert',            'Bereits vorhanden',            'Kategorie ausgetauscht'        ],        'Vandalismus/Spam EN', [            'Reverting vandalism', 'Reverting Spam', ],       'Vandalismus/Spam DE', [ 'Spam', 'Vandalismus' ]   ] }; importScriptPage("MediaWiki:Standard_Edit_Summary/code.js", "dev"); /*Verhinderung vom Infobox-Builder bei neuen Vorlagen | Code by Kopcap94*/ (function( $, mw ) {   if ( mw.config.get( 'wgNamespaceNumber' ) !== 10 && !$( '.noarticletext' ).lenght ) return;    var default_infobox =         ' \n' +        '    \n' +        '         \n' +        '    \n' +        '    \n' +        '    \n' +        '         \n' +        '         \n' +        '    \n' +        ' ',        i18n = {            en: 'Create infobox',            de: 'Infobox erstellen'        },        name = ( typeof i18n[ mw.config.get('wgUserLanguage') ] !== 'undefined' ) ?                i18n[ mw.config.get('wgUserLanguage') ] :                i18n.en ;    $( ' ', { id: 'createTemplate', style: 'margin-top: 2px;', text: name }).appendTo( '#WikiaPageHeader' );   $( '#createTemplate' ).on( 'click', function { if ( !confirm( 'Du möchtest eine Infobox erstellen, richtig?' ) ) return; $( this ).html(''); $.post('/api.php', {           action: 'edit',            title: mw.config.get( 'wgPageName' ),            summary: 'Creating new PI',            text: default_infobox,            token: mw.user.tokens.get('editToken'),            format: 'json'        }, function( data ) {            var articleID = data.edit.pageid;            $.post( '/wikia.php?controller=TemplateClassificationApi&method=classifyTemplate&format=json', { type: 'infobox', pageId: articleID, editToken: mw.user.tokens.get('editToken') }, function { var link = location.toString, type = ( link.indexOf( '?' ) > -1 ) ? '&' : '?';               location = link + type + 'action=edit&useeditor=source'; });       });    }); })( this.jQuery, this.mediaWiki ); /* -Adds edit links to WLH page -- */ function addEditLinksToWLH { if(wgCanonicalSpecialPageName=='Whatlinkshere') {   var links = document.getElementById("mw-whatlinkshere-list").getElementsByTagName('li'); for(var i = 0; i(edit) '; links[i].insertBefore(editLinkSpan,tools[0]); } } } addOnloadHook(addEditLinksToWLH);

//Add links to toolbar $('Global.css' +  'Global.js' +   'Mypage/wikia.css</a></li>' +   'MediaWiki:Recentchangestext?</a></li>' +   'SpecialPages</a></li>' +   'DoubleRedirects</a></li>' +   'MediaWiki:ImportJS</a></li>' +   'JSPages</a></li>' +   'AllPages</a></li>' +   'PrefixIndex</a></li>' +   'UnusedFiles</a></li>' +   '<li><a href="/wiki/Special:ListGroupRights">ListGroupRights</a></li>' + '<li><a href="/wiki/Special:ListUsers">ListUsers</a></li>' + '<li><a href="/wiki/Special:ListAdmins">ListAdmins</a></li>')   .insertBefore('.WikiaBarWrapper .tools-menu li:first');

/* Create an edit link on Special:MovePage for easy redirecting */ if (c.wgCanonicalSpecialPageName == "Movepage") { href = $('fieldset').find('a').attr('href') + '?action=edit', link = ' <a href="'+href+'">(Bearbeiten)</a>'; $('#mw-movepage-table').find('a').first.after(link); }

if (window.location.pathname.indexOf('Spezial:InfoboxBuilder') != -1) { var name = window.location.pathname.split('Spezial:InfoboxBuilder/')[1]; location.replace(document.URL.replace(window.location.href.split('/wiki/')[1],'Vorlage:'+name+'?action=edit&useeditor=source')); } if (window.location.pathname.indexOf('Special:InfoboxBuilder') != -1) { var name = window.location.pathname.split('Special:InfoboxBuilder/')[1]; location.replace(document.URL.replace(window.location.href.split('/wiki/')[1],'Template:'+name+'?action=edit&useeditor=source')); } /* changing "Start a wikia" in RC by AmonFatalis */ $('.start-wikia').attr('href','/wiki/Special:RecentChanges?hidebots=0').attr('title','Special:RecentChanges').text('Änderungen');