User:Dragon Rainbow/global.js

/* Buttons by AmonFatalis */ if (mwCustomEditButtons) { mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://static2.wikia.nocookie.net/monsterhunternews/de/images/d/d3/Button_Weiterleitung.png", "speedTip": "Weiterleitung", "tagOpen": "#REDIRECT ",   "tagClose": "", "sampleText": "R" }; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/f/fd/Button_blockquote.png", "speedTip": "Anführungszeichen", "tagOpen": "„", "tagClose": "“", "sampleText": "M" }; mwCustomEditButtons[mwCustomEditButtons.length] = { "imageFile": "http://upload.wikimedia.org/wikipedia/en/f/fd/Button_blockquote.png", "speedTip": "Magic", "tagOpen": "__", "tagClose": "__", "sampleText": "NOEDITSECTION" }; } /* chat hacks */ importScriptPage('User:Monchoman45/ChatHacks.js', 'c');

//Persönliche Styles importScriptPage('Benutzer:Dragon Rainbow/Styles.js', 'de.rain');

//Hacks importScriptPage('Benutzer:Dragon Rainbow/hacks.js', 'de.rain');

//ChatQuotes importScriptPage('User:Wildream/ChatQuote/code.js', 'ru.c');

//Persönliche Skripte importScriptPage('Benutzer:Dragon Rainbow/scripts.js', 'de.rain');

//Zusammenfassungen importScriptPage("MediaWiki:Zusammenfassungen.js", "de.rain");

/* Easily see removed messages on threads */ if ($('.removed-info.speech-bubble-message-removed').length && mw.config.get('wgCanonicalNamespace') == "Thread") { $('.removed-info.speech-bubble-message-removed').each(function {   var id = $(this).parent.attr('id');    $(this).append(' (see message)')  }); }

//Schnelles Erstellen der Benutzerseiten importScriptPage('MediaWiki:Benutzerseiten.js', 'de.rain');

//Skripte (die notwendigsten) importScriptPage('MediaWiki:Scripts.js', 'de.rain');

//Hide Rail importScriptPage('MediaWiki:HideRail/code.js', 'dev');

// Redirect management importScriptPage('MediaWiki:RedirectManagement/code.js', 'dev');

//SkinSwitch importScriptPage('MediaWiki:SkinSwitchButton/code.js', 'dev');

//OldFilePages OFPoptions = {'showlinks': true}; importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:OldFilePages/code.js'    ] });

//NoImageLightbox window.NoImageLightbox = { novideo: true }; importArticles({   type: 'script',    articles: [        'u:dev:MediaWiki:NoImageLightbox/code.js',        //'u:a:MediaWiki:Gadget-HotCat.js'    ] });

/* RC link in global nav by User:AmonFatalis */ $('Letzte Änderungen').appendTo('.global-navigation-container');

//Alle XY löschen importScriptPage('MediaWiki:MultipleFileDelete/code.js', 'dev');

//Finden und Ersetzen importScriptPage('MediaWiki:FindAndReplace/code.js', 'dev');

/* Stuff written by @Bobogoobo */ // Add "infinite" value to expiry dropdowns (another thing that should be built-in) $('#mw-input-wpExpiry option:last').before(   $(' ', { 'value':'infinite', 'text':'infinite' }) ); //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

/* Add powerusers checkbox to Special:ListUsers - Credit to User:452 */ if (wgCanonicalSpecialPageName == "ListUsers") $("fieldset.lu_fieldset tr:last-child").prepend('  Power Users '); /* 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)); // QuickLogs importScriptPage('MediaWiki:QuickLogs/code.js', 'dev');

/* Custom "NewFilesModule" by 452 (with fixes by JoshuaJSlone) This script displays Special:NewFiles in the right rail There are three ways to use this, by setting the NewFilesModuleCompact variable 0 - Normal, width is 212 1 - Compact, width is 106 2 - Random, if you're not sure which version you like best.

In both modes, hovering over each displays the uploader info.

NewFilesModuleCount can be used to specify the number of displayed images. var NewFilesModuleCompact = 1; //must be 0, 1, or 2. var NewFilesModuleCount = 13; //any integer

if ($('#WikiaRail').length) { //only on pages where the rail is present $('#WikiaRail').bind('DOMNodeInserted', function(event) { //fires after lazy-loading takes place.   if (!$("#NewFilesModule").length) { // Only add it once      if (typeof $temp == "undefined") { // Only load it once        $temp = $(' '); // this line, and the next, originate from http://dev.wikia.com/wiki/AjaxRC/code.js <3        $temp.load("/Special:NewFiles/" +NewFilesModuleCount + " #gallery-", function  { $('#WikiaRail section:last-of-type').after(" New FilesUpload "); if (typeof NewFilesModuleCompact == "undefined") NewFilesModuleCompact = 0; if (NewFilesModuleCompact == 2) NewFilesModuleCompact = Math.floor(Math.random*2); if (NewFilesModuleCompact) { $('#gallery-', $temp).html(             $('#gallery-', $temp).html              .replace(/\/revision\/latest\?/g, "/revision/latest/scale-to-width-down/106?")              .replace(/\/scale-to-width-down\/\d*\?/g, "/scale-to-width-down/106?") //-down is redundant on this line, but kept for consistency            ); $("#NewFilesModule").addClass("compact"); }         $("#NewFilesModule").append(' '); $(".wikia-gallery-item", $temp).each(function {            $(".lightbox-caption", this).prepend($("").attr("href",$(".gallery-image-wrapper>a", this).attr("href")).html($(".gallery-image-wrapper>a", this).attr("title")).append($(" ")));            $("#NewFilesModule #gallery-").append(this);          });

delete $temp; //delete it, in case the rail is wiped after this point. });       if (!$("#NewFilesModuleCSS").length) $('head').append('\n#gallery- { position:relative;overflow-y:auto; clear: both; text-align:center; height:452px; }\n#gallery-:hover {padding-bottom: 13em; }\n#NewFilesModule .gallery-image-wrapper { top: 0 !important; height: auto !important; border:none; background: none; }\n#NewFilesModule.compact .gallery-image-wrapper { width: auto !important; }\n#NewFilesModule .thumb { height:auto !important; }\n#NewFilesModule .wikia-gallery-item { margin: 1px !important; padding: 0 !important; height: auto !important; border: none !important; }\n#NewFilesModule.compact .wikia-gallery-item { width: auto !important; }\n#NewFilesModule .wikia-gallery-item .lightbox-caption { display: none; }\n#NewFilesModule .wikia-gallery-item:hover .lightbox-caption { display:block; padding: 5px; margin-top: 0; position: absolute; border: 1px solid; background-color: #fff; z-index: 2; right: 0; width: 250px !important; }\n#NewFilesModule h2 {margin: 0 2em 0 0;}\n#NewFilesModule h2 a:first-child {color:inherit;}\n#NewFilesModule img { display: block; height: auto !important; width: auto !important; margin-left: auto !important; margin-top: auto !important;}\n.wikia-gallery-item .gallery-image-wrapper a { width: auto !important; height: auto !important; }\n.wikia-gallery-item .gallery-image-wrapper a.image-no-lightbox { line-height: normal; display: block; padding: 1em; }\n ');

}   }  });  //end of DOMNodeInserted block  $('#WikiaRail').trigger('DOMNodeInserted'); //Prevent race condition by firing the event.

} /* End of custom "NewFilesModule " */

//Siehe Systemnachrichten mit einem Klick importScriptPage('QQX/code.js', 'dev');