Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.js

MediaWiki interface page
Revision as of 01:35, 21 May 2011 by CzechOut (talk | contribs) (Undo revision 584495 by CzechOut (talk) restoring previous version briefly to see if loading archive tool remotely is visible in monobook)
Clear your cache often around here

After changes are made to this site's CSS or Javascript, you have to bypass your browser's cache to see the changes. You can always do this by going to your browser's preferences panel. But many browsers also offer keyboard shortcuts to save you that trouble. The following shortcuts work in the versions of the browsers that Tardis currently supports. They may not work in earlier versions.

  • Firefox: hold down Shift while performing a page reload.
  • Opera offers no default keyboard shortcut, but you can create a custom keyboard shortcut with the value Clear disk cache
  • Safari users should simultaneously hold down + Option + E. You may need to enable the Develop menu first
  • Chrome: press Ctrl + F5 or Shift + F5 while performing a page reload.
/* Any JavaScript here will be loaded for all users on every page load. */
importScriptPage('ShowHide/code.js', 'dev');
importScriptPage('EditIntroButton/code.js', 'dev' );
importScriptPage('AjaxBatchDelete/code.js', 'dev');
importScriptPage('DisableArchiveEdit/code.js', 'dev');
importScriptPage('DupImageList/code.js', 'dev');
// importScriptPage('AdvancedOasisUI/code.js', 'dev'); violates Wikia TOU but is okay for individual users to use
importScriptPage('PurgeButton/code.js', 'dev');
importScriptPage('ShowAdsButton/code.js', 'dev');
importScriptPage('WikiSwitch/code.js', 'dev');

wikiaDomainList = new Array(
	{ id: 'central', domain: 'www.wikia.com', name: 'Central', title: 'Central Wikia', interwiki: 'w:' }
);

var ArchiveToolConfig = { 
   archiveListTemplate: 'Archives',
   archivePageTemplate: 'Archivepage',
   archiveSubpage: 'Archive',
   userLang: true
};
var ArchiveToolConfig = { 
   en: {
      buttonArchiveTool: "Archive",
      buttonArchiveToolTooltip: "Archive this page",
      buttonSelectAll: "Select all",
      buttonDeselectAll: "Deselect all",
      buttonSaveArchive: "Save archive",
      buttonAbort: "Abort",
      labelLines: "Lines",
      labelSections: "Sections",
      summaryArchiveFrom: "ArchiveTool: Archiving from",
      summaryArchiveTo: "ArchiveTool: Archiving to"
   }
}
importScriptPage('ArchiveTool/code.js', 'dev');

/* Turning this off for now
var OasisToolbarButtonsConfig = { 
   purgeOnly: false,
   userLang: true
};
importScriptPage('OasisToolbarButtons/code.js', 'dev');
var OasisToolbarButtonsConfig = { 
   en: {
      addTopic: "Add topic",
      editwithform: "form",
      deleteThis: "Del",
      history: "Hist",
      move: "Move",
      protect: "Pro",
      undelete: "Undel",
      unprotect: "Unpro",
      viewsource: "Src",
      whatlinkshere: "Link"
   }
}
***** END ARCHIVE */

/*This comes from [[starwars:User:Sikon/preload.js]] and implements the preloadable template system at bottom of input page*/

document.write('<script type="text/javascript" src="' 
    + '/index.php?title=MediaWiki:Functions.js&action=raw&ctype=text/javascript"></script>');

function fillPreloads()
{
    var div = document.getElementById("lf-preload");

    if(div == null)
        return;

    div.style.display = 'block';
    var span = document.getElementById('lf-preload-cbox');

    var comboString = "<select id='stdPreloads' onchange='onPreloadChange()'>";
    comboString += "</select>";
    span.innerHTML = comboString;
    
    span = document.getElementById('lf-preload-pagename');
    span.innerHTML = '<input type="text" class="textbox" />';
    span = document.getElementById('lf-preload-button');
    span.innerHTML = '<input type="button" class="button" value="Insert" onclick="doCustomPreload()" />';

    requestComboFill('stdPreloads', "Template:Stdpreloads");
}

function doCustomPreload()
{
    doPreload(document.getElementById('lf-preload-pagename').getElementsByTagName('input')[0].value);
}

function onPreloadChange()
{
    var combo = document.getElementById("stdPreloads");
    var value = combo.options[combo.selectedIndex].value;

    if(value == "")
        return;

    value = "Template:" + value + "/preload";
    value = value.replace(" ", "_");
    doPreload(value);
}

addOnloadHook(fillPreloads);

/* Preload system ends */

/* The following Facebook box builder comes from Improvaganza Wiki.  It's sort of cool, but it may not be something
we keep around.  It creates a little box allowing you to like whatever thing appears after "id="
   below.  At present, it's using the id for Doctor Who on Facebook.  You can see an example of what it 
   does at [[user:CzechOut/Sandbox10]].  Might be an idea to rotate it every once in a while, putting up the id of 
   whatever's the "hottest" thing in the DWU at the moment.
   
   The IDs of some other shows:
   
   Torchwood: 113521238658450
   The Sarah Jane Adventures: 109282012424173
   Doctor Who:  127031120644257
   Big Finish: 109833429043462 */

function fBox() {
	$('#fbox').append('<iframe marginheight="0" marginwidth="0" src="http://www.facebook.com/connect/connect.php?id=127031120644257&amp;connections=10" align="top" frameborder="0" width="300" height="90" scrolling="no" />');
}

$(fBox);
Cookies help us deliver our services. By using our services, you agree to our use of cookies.