MediaWiki:Common.js

/* Replaces with the name of the user browsing the page. Requires copying Template:USERNAME. */

importScriptPage('ShowHide/code.js', 'dev');

/* End of the replacement */

/* Add UTC clock above articles */ importScript('MediaWiki:Common.js/displayTimer.js');

importScriptPage('BackToTopButton/code.js', 'dev');

importScriptPage('CollapsibleEdittools/code.js', 'dev');

EditIntroButtonText = 'Intro'; importScriptPage('EditIntroButton/code.js', 'dev')

importScriptPage('Countdown/code.js', 'dev');

importScriptPage('AutoEditDropdown/code.js', 'dev');

function addPageBottom { $("#WikiaArticle").append('  '); }

$(addPageBottom);

importScriptPage('PurgeButton/code.js', 'dev');

// Disable the button to add images to existing galleries $(function{	$('#bodyContent .wikia-gallery-add a').unbind('click').click(function{return false;}); });

//break

/* Any JavaScript here will be loaded for all users on every page load. */

// Ajax auto-refresh var ajaxPages = ['Special:RecentChanges','Special:WikiActivity','Special:Contributions']; var AjaxRCRefreshText = 'Auto-refresh'; importScriptPage('AjaxRC/code.js', 'dev'); var ajaxRefresh = 30000; // END of ajax auto-refresh // Credit to Beyblade wiki. // Adding "My Contributions" to user menu. // Function: Adds "My Contributions" to the UserDropdownMenu. function UserContribsMenuItem { $('ul.AccountNavigation li:first-child ul.subnav li:first-child').after('My contributions'); } addOnloadHook(UserContribsMenuItem); function onloadhookcustom { var replace = document.getElementById("OnlineChat"); if (null != replace) { var getvalue = replace.getAttribute("class"); replace.innerHTML=' [ Copy this | Start New</a> | <a href="http://beybladewiki.chatango.com">Full Size</a> ]'; } } if (window.addEventListener) {window.addEventListener("load",onloadhookcustom,false);} else if (window.attachEvent) {window.attachEvent("onload",onloadhookcustom);}

// Add CANCEL Button for new RTE importScript('MediaWiki:Wikia.js/cancelButton.js'); // END Add CANCEL Button for new RTE

// Add EditCount tab to user namespace importScript('MediaWiki:Wikia.js/editCount.js'); // END Add EditCount tab to user namespace

// Edits to OnTheWiki // importScript('MediaWiki:Wikia.js/OnTheWiki.js'); // END Edits to OnTheWiki

// Custom headers for Hot Spots and Community Messages function hotspotsheader { $('.HotSpotsModule').prepend(' <img src="http://images.wikia.com/merlin1/images/9/93/Hot_Spots.png"> '); }

$(hotspotsheader);

function communityheader { $('.CommunityCornerModule').prepend(' <img src="http://images.wikia.com/merlin1/images/c/c5/Community_Messages.png"> '); }

$(communityheader); // END Custom headers for Hot Spots and Community Messages

importScriptPage('Standard_Edit_Summary/code.js', 'dev');

importArticle({type:'script', article:'w:c:dev:UserTags/code.min.js'});

window.UserTagsJS = { modules: {}, tags: {} }; UserTagsJS.modules.inactive = { days: 10, namespaces: [0, 'Talk', 'User talk', 'Forum'] // Edits must be to articles or talk pages or user talk pages or the forum to count, others don't count }; UserTagsJS.modules.mwGroups = ['sysop', 'bannedfromchat'];

importArticle({type: 'script', article: 'w:c:dev:VisualSpellCheck/code.js'});

importScriptPage('SpoilerAlert/code.js', 'dev');

/* Ratings/Stars widget code You can add more Rating-Widgets in your site, just pick some new rating-widget-unique-id (must be positive integer). For example (rating-widget-unique-id = 38): IMPORTANT: The number must be unique across the entire wiki. [One number = one page] */ (function(window, document) {       "use strict";        // Async Rating-Widget initialization.        window.RW_Async_Init = function{            RW.init("4893AEDA8BA1095BEEA0C43249CDD374", {               advanced: { star: { stars: 10 },                   font: { color: "#000" },                   layout: { align: { hor: "center", ver: "top" },                       dir: "ltr" }               },                size: "medium", color: "yellow", type: "star" });           RW.render;        };

// Append Rating-Widget JavaScript library. if (typeof(window.RW) === "undefined"){ var rw = document.createElement("script"); rw.type = "text/javascript"; rw.src = "http://js.rating-widget.com/external.min.js?t=js"; document.getElementsByTagName("head")[0].appendChild(rw); } })(window, document);