MediaWiki:Common.js

// Navigation bar at the bottom of WikiaPage -ATW (function {   var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;    po.src = 'https://apis.google.com/js/plusone.js';    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);  }); (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0];  if (d.getElementById(id)) return;  js = d.createElement(s); js.id = id;  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";  fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); $('#WikiaPage .WikiaPageContentWrapper').append(' '); // END Navigation bar at the bottom of WikiaPage $(function {	$('div.embedMe').each(function { var filename = $(this).attr('id'); if (filename) { filename = filename.replace(/\.2F/gi, '/'); $(this).html(''); }	}); }); // ================================================================== // Adding links to On the Wiki tab and change PHOTOS to FILES -credits w:c:runescape // ================================================================== $(document).ready(function {   if ( skin == 'oasis' && $.inArray("staff", wgUserGroups) == -1) {        $('.WikiHeaderRestyle nav ul li.marked ul').append('NewsDisclaimerShoutbox');        $('.WikiHeaderRestyle ul li:first-child  a[href="/wiki/Special:NewFiles"]').replaceWith('New Files');    } }); // ============================================================ // wikiSiteMeter // // Function: Adds a counter from http://www.sitemeter.com/ // ============================================================ $(function {	if(skin == "oasis") {		var $sidebar = $('.WikiaActivityModule.module:first');		var comboString = " ";		$sidebar.html($sidebar.html + comboString);	} else if(skin == "monobook") {		var $sidebar = $('#p-wikicities-nav');		var comboString = " sitemeter  ";		$sidebar.html($sidebar.html + comboString);	} }); /*   Replaces  with the name of the user browsing the page. Requires copying Template:USERNAME. function UserNameReplace { if(typeof(disableUsernameReplace) != 'undefined' && disableUsernameReplace || wgUserName == null) return; $("span.insertusername").html(wgUserName); } addOnloadHook(UserNameReplace);

/* End of the replacement */

/****************************/ /* IMPORTED START          */ /****************************/ // Extra Rollback Buttons -Thanks Monch importScript('MediaWiki:Common.js/extraRollbacks.js'); // END Extra Rollback Buttons // AjaxRollback - works with Extra Rollback Buttons importScript('MediaWiki:Common.js/ajaxRollback.js'); // END AjaxRollback

/* Standard edit summaries*/ importScript('MediaWiki:Common.js/es.js');

/* Ajax Auto-Refresh (courtesy pcj) */ /* Auto updating recent changes opt-in * See w:c:dev:AjaxRC for info & attribution */ AjaxRCRefreshText = 'Auto-refresh'; AjaxRCRefreshHoverText = 'Automatically refresh the page'; ajaxPages = ["Special:RecentChanges","Special:WikiActivity"]; importScriptPage('AjaxRC/code.js', 'dev');

/* Count-down Timer */ importScript('MediaWiki:Common.js/countdowntimer.js');

/* Collapsible Tables */ importScript('MediaWiki:Common.js/collapsetables.js');

/* Custom edit buttons */ importScript('MediaWiki:Common.js/CEB.js');

/** Dynamic Navigation Bars (experimental)**/ importScript('MediaWiki:Common.js/Nav.js');

/* other */ importScript('MediaWiki:Common.js/other.js');

/* Display Timer */ importScript('MediaWiki:Common.js/DisplayTimer.js');

/****************************/ /* END OF THE IMPORTED    */ /****************************/

//Facebook 'Like Box' //Graciously provided by The Spanish 'Simspedia' function fBox { $('#fbox').append('<iframe marginheight="0" marginwidth="0" src="http://www.facebook.com/connect/connect.php?id=126686564044617&amp;connections=10" align="top" frameborder="0" width="300" height="250" scrolling="no" />'); } $(fBox);

/* Fast Delete see below */ importScriptPage('MediaWiki:Common.js/fastDelete.js');

// ***************************************************************** // Custom automatic delete buttons // ***************************************************************** // Adds customizable one-click deletion buttons to any deletable page. // Requires MediaWiki:Common.js/fastDelete.js in appendScript;

var fdButtons = []; fdButtons[fdButtons.length] = { 'summary': 'Vandalism', 'label': 'Vandalism'}; fdButtons[fdButtons.length] = { 'summary': 'Cleaning up old pages', 'label': 'Clean-Up'}; fdButtons[fdButtons.length] = { 'summary': 'Removing Spam Page', 'label': 'Spam'}; fdButtons[fdButtons.length] = { 'summary': 'Cleaning up un-Edited Stub Page', 'label': 'Old Stub Page'}; // end Custom automatic delete buttons if(wgNamespaceNumber!=-1) addOnloadHook(function { addPortletLink('p-cactions','/wiki/Special:Prefixindex/' + escape(wgPageName),'Subpages','ca-subpages','Show subages of ' + wgPageName); }); //

// ***************************************************************** // Custom User Tags // ***************************************************************** // Adds certain tags to certain User pages. /* Burs */ $(function { $('.page-User_Tama63 .masthead-info hgroup .group').html('Bureaucrat'); });

$(function { $('.page-User_Katbluedog .masthead-info hgroup .group').html('Bureaucrat'); });

$(function { $('.page-User_Stpehen .masthead-info hgroup .group').html('Bureaucrat'); });

$(function { $('.page-User_Curycoo .masthead-info hgroup .group').html('Bureaucrat'); });

$(function { $('.page-User_CaptainGoldvane2 .masthead-info hgroup .group').html('Bureaucrat'); });

/* Admins */ $(function { $('.page-User_Jack.Pistol .masthead-info hgroup .group').html('Admin'); });

$(function { $('.page-User_GenLawrence .masthead-info hgroup .group').html('Admin'); });

/* Rollbacks */ $(function { $('.page-User_Sharple .masthead-info hgroup .group').html('Rollback'); });

$(function { $('.page-User_Benjamin Macmorgan .masthead-info hgroup .group').html('Rollback'); });

ome: press Ctrl+F5 or Shift+F5

// Credit to Runescape Wiki //Chat's topic. Remember to escape single quotes in the topic using \' to prevent this from breaking. var chatTopic = 'Ahoy and Welcome to the Pirates Online Players Wiki chat. Rules and more information can be found  here </a>.' $(function {	$('#ChatHeader .public.wordmark').prepend('<div class="chattopic" style="text-align:center;position:absolute;width:100%;z-index:0;font-size:14px;color:#3A3A3A">'+chatTopic+' ')	.find('a').attr('style','position:relative;text-decoration:underline;') }) $('#ChatHeader .public.wordmark div:not(:first-child)').remove