MediaWiki:Wikia.js

/* USE THIS SCRIPT LOADER PWEASE */ importArticles({   type: "script",    articles: [ /*        "User:Mfaizsyahmi/chat2.js", */ /*        "User:Mfaizsyahmi/DeadlineAlert.js", */ //        "MediaWiki:AdminHilights.js",        "User:Mfaizsyahmi/g-contest.js", /*        "User:Mfaizsyahmi/zalgo.js", */  /* HE COMES */        "User:Mfaizsyahmi/ytlinkpopup4.js"    ] });

/******************** ADMIN HIGHLIGHTS ********************/ (function($, Array) {	var HPWadmins = [ 		"KakashiBallZ", 		"Blakegripling ph", 		"Elite Prime",		"MabusWinnfield",		"Mfaizsyahmi",		"FegeleinParodies",		"JennieParker87",		"Benad361",		"Soalric",		"Yhynerson1"		]	//var adminCommentSelectors = new Array;	//var adminCommentDeclarations = "background:radial-gradient(#3a3a3a, #2a2a2a) !important;";	/* for the comment chevrons */	//var adminCommentDeclarations2 = "border-color: transparent #2e2e2e #2e2e2e transparent !important";	var adminLinkSelectors = new Array;	var adminLinkDeclarations = "color: #00cc00";	for (var i = 0; i < HPWadmins.length; i++) {		var adminname = HPWadmins[i].replace(' ','_');		//adminCommentSelectors.push('ul#article-comments-ul li[data-user="' + HPWadmins[i] + '"]');		adminLinkSelectors.push('.WikiaPageContentWrapper a[href*="/wiki/User:'+ adminname +'"], .WikiaPageContentWrapper a[href*="/wiki/Message_Wall:'+ adminname +'"], .WikiaPageContentWrapper a[href*="/wiki/User_blog:'+ adminname +'"], .WikiaPageContentWrapper a[href*="/wiki/Special:Contributions/'+ adminname +'"]'); }	$('head').append(' ' + /*adminCommentSelectors.join(' blockquote, ') + ' blockquote {' + adminCommentDeclarations + '}' + adminCommentSelectors.join(' .speech-bubble-message:after, ') + ' .speech-bubble-message:after {' + adminCommentDeclarations2 + '}' +*/ adminLinkSelectors.join(', ') + '{' + adminLinkDeclarations + '} ') })(jQuery, Array); /******************** END OF ADMIN HIGHLIGHTS ********************/

// for the Background template, use with caution $(".backgroundcssinject").first.each(function{   bgurl = $(".backgroundcssinject .url").text;    bgcolor = $(".backgroundcssinject .color").text;    bgrpt = $(".backgroundcssinject .repeat").text;    bgatt = $(".backgroundcssinject .attachment").text;    bgpos = $(".backgroundcssinject .position").text;    $("body").css('background', bgcolor + ' url(' +bgurl+ ') ' +bgrpt+ ' ' +bgatt+ ' ' +bgpos); });

// Wiki Navigation additions $("header nav > ul> li:first-child > ul.subnav-2").append('NewsFeatured');

// button to stop bg music if there's any // 22 Oct 12: made to also remove halloween background music if ($("#yolo").length || $("#halloweenbg").length) $("header nav > ul> li:first-child > ul.subnav-2").append(' :stopmusic: For good? '); $("#stopmusic").click(function{   $("#yolo, #halloweenbg").remove;    if ( $('input', this).attr('checked') ) $.cookie("HPW-nomusic", true, { expires: 365 } ) });

// 404 image

// In FC suggestions thread, automatically scrolls down to the last post //$('body.page-Thread_9640').animate({ //        scrollTop: $("li.message:last").offset.top //     }, 500);

//alternate wordmark //if (Math.random >= 0.5) $(".wordmark img").attr("src", "http://ums.pixub.com/files/wordmark fnaf2.png")

/******************** DRAGGABLE ELEMENT ********************/ /* http://jsfiddle.net/tovic/Xcb8d/light/ */ var selected = null, // Object of the element to be moved x_pos = 0, y_pos = 0, // Stores x & y coordinates of the mouse pointer x_elem = 0, y_elem = 0; // Stores top, left values (edge) of the element // Will be called when user starts dragging an element function _drag_init(elem) { // Store the object of the element which needs to be moved selected = elem; x_elem = x_pos - selected.offsetLeft; y_elem = y_pos - selected.offsetTop; } // Will be called when user dragging an element function _move_elem(e) { x_pos = document.all ? window.event.clientX : e.pageX; y_pos = document.all ? window.event.clientY : e.pageY; if (selected !== null) { selected.style.left = (x_pos - x_elem) + 'px'; selected.style.top = (y_pos - y_elem) + 'px'; } } // Destroy the object when we are done function _destroy { selected = null; } // Bind the functions... document.getElementById('draggable-element').onmousedown = function { _drag_init(this); return false; }; document.onmousemove = _move_elem; document.onmouseup = _destroy; /********************END OF DRAGGABLE ELEMENT ********************/