User:Madminecrafter12/common.js

// Initialises stripes on all zebra tables after page load $(document).ready(function {	$('table.zebra tbody tr:nth-child(even)').addClass('even');	$('table.zebra tbody tr:nth-child(odd)').addClass('odd'); });

// Re do stripes on a table after sort finishes $(document).on('sortEnd.tablesorter', function(event) {	var table = $(event.target);	if(table.hasClass('zebra')) {		$('tbody tr:nth-child(even)',table).addClass('even').removeClass('odd');		$('tbody tr:nth-child(odd)',table).addClass('odd').removeClass('even');	} });

function getImageThumbnailURL(name, store, size) { var encodedName = encodeURIComponent(name.replace(/ /g, "_")); return "https://minecraft.gamepedia.com/media/minecraft.gamepedia.com/thumb/" + store + "/"		+ encodedName + "/"		+ size + "px-" + encodedName; }

function mimicIndicator(id, link, imgName, imgStore, title) { var encodedLink = encodeURIComponent(link.replace(/ /g, "_")); return $(" ") .attr("id", "mw-indicator-" + id) .addClass("mw-indicator") .append($("")			.attr({ "href": "/" + encodedLink, "title": title }).append($(" ") .attr({				"alt": title,				"src": getImageThumbnailURL(imgName, imgStore, 25),				"srcset": getImageThumbnailURL(imgName, imgStore, 38)					+ " 1.5x, "					+ getImageThumbnailURL(imgName, imgStore, 50)					+ " 2x",				"width": "25",				"height": "25"				}) )		); }

// JavaScript code $(function {	var blockedDiv = $(".blocked");	if (blockedDiv.length > 0) {		var usernameSpan;		var username;		var targetBlock = $(".userinfo");		if ($("#mw-mf-viewport").length > 0) { // Detect mobile mode			usernameSpan = $("#section_0");			username = usernameSpan.html.match(/UserProfile:(.*)/)[1];		} else {			usernameSpan = $("h1 .mw-headline");			username = usernameSpan.attr("id");		}

$(' ').append(			$(' ')			.append("This user is currently blocked! ")			.append($("") .attr("href", "https://minecraft.gamepedia.com/index.php?title=Special:Log/block&page=User%3A" + username) .attr("title", "Block log") .text("Check the block log") ).append(" • ")			.append($("") .attr("href", "https://minecraft.gamepedia.com/Special:GlobalBlockList?wpTarget=" + username) .attr("title", "Global block log") .text("List global blocks") ).append("")		).appendTo(targetBlock); } });

/* Halloween style for the Minecraft wiki. Created by pt:User:Eduaddad, edited by Benutzer:violine1101. */

background-image: url(https://minecraft-de.gamepedia.com/media/minecraft-de.gamepedia.com/d/dd/Halloween-headerbg.png) !important; }
 * 1) mw-page-base {

div.vectorTabs span, div.vectorTabs span:before, div #mw-head div.vectorMenu > h3, div #mw-head div.vectorMenu > h3:first-child:before, div #mw-head div.vectorMenu > h4, div #mw-head div.vectorMenu > h4:first-child:before, div#p-variants.vectorMenu #mw-vector-current-variant, div#p-variants.vectorMenu #mw-vector-current-variant:before { background-image: url(https://minecraft-pt.gamepedia.com/media/minecraft-pt.gamepedia.com/8/80/Halloween-Vector-tabs.png) !important; }

div#content:before { border-top-color: #37271B !important; }

background-image: url(https://minecraft-pt.gamepedia.com/media/minecraft-pt.gamepedia.com/d/d4/Halloween-Vector-tabs-first.png) !important; }
 * 1) left-navigation div.vectorTabs li:first-child span:before {

.mcwiki-header { background-image: url(https://minecraft-de.gamepedia.com/media/minecraft-de.gamepedia.com/3/32/Myzelhintergrund.png) !important; }

.mw-wiki-logo { background-image: url(https://minecraft-pt.gamepedia.com/media/minecraft-pt.gamepedia.com/7/7c/Halloween_wiki.png) !important; }

/* Style search */

div#simpleSearch { left: -1px !important; top: 0px !important; }

div#p-search form { border-right: 4px solid #662690 !important; }

div#p-search form:after { border-top: 4px solid #965CBC !important; border-left: 4px solid #662690 !important; }

div#simpleSearch:after { border-top: 3px solid #965CBC !important; border-left: 3px solid #E6E6E6 !important; }