MediaWiki:Common.js: Difference between revisions
From Tardis Wiki, the free Doctor Who reference
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
importScriptPage('ShowAdsButton/code.js', 'dev'); | importScriptPage('ShowAdsButton/code.js', 'dev'); | ||
importScriptPage('WikiSwitch/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 = { | var ArchiveToolConfig = { | ||
archiveListTemplate: 'Archives', | archiveListTemplate: 'Archives', | ||
Line 14: | Line 19: | ||
userLang: true | userLang: true | ||
}; | }; | ||
var ArchiveToolConfig = { | var ArchiveToolConfig = { | ||
en: { | en: { | ||
Line 31: | Line 31: | ||
summaryArchiveFrom: "ArchiveTool: Archiving from", | summaryArchiveFrom: "ArchiveTool: Archiving from", | ||
summaryArchiveTo: "ArchiveTool: Archiving to" | summaryArchiveTo: "ArchiveTool: Archiving to" | ||
} | |||
} | |||
importScriptPage('ArchiveTool/code.js', 'dev'); | |||
var OasisToolbarButtonsConfig = { | |||
purgeOnly: false, | |||
userLang: true | |||
}; | |||
importScriptPage('OasisToolbarButtons/code.js', 'dev'); | |||
var OasisToolbarButtonsConfig = { | |||
en: { | |||
addTopic: "Add topic", | |||
edit: "Edit", | |||
editwithform: "form", | |||
deleteThis: "Delete", | |||
history: "History", | |||
move: "Rename", | |||
protect: "Protect", | |||
purge: "Purge", | |||
undelete: "Undelete", | |||
unprotect: "Unprotect", | |||
viewsource: "View source", | |||
whatlinkshere: "What links here" | |||
} | } | ||
} | } | ||
/*This comes from [[starwars:User:Sikon/preload.js]] and implements the preloadable template system at bottom of input page*/ | /*This comes from [[starwars:User:Sikon/preload.js]] and implements the preloadable template system at bottom of input page*/ | ||
Revision as of 00:18, 3 April 2011
/* Any JavaScript here will be loaded for all users on every page load. */
importScriptPage('ShowHide/code.js', 'dev');
importScriptPage('AjaxBatchDelete/code.js', 'dev');
importScriptPage('DisableArchiveEdit/code.js', 'dev');
importScriptPage('DupImageList/code.js', 'dev');
importScriptPage('AdvancedOasisUI/code.js', 'dev');
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');
var OasisToolbarButtonsConfig = {
purgeOnly: false,
userLang: true
};
importScriptPage('OasisToolbarButtons/code.js', 'dev');
var OasisToolbarButtonsConfig = {
en: {
addTopic: "Add topic",
edit: "Edit",
editwithform: "form",
deleteThis: "Delete",
history: "History",
move: "Rename",
protect: "Protect",
purge: "Purge",
undelete: "Undelete",
unprotect: "Unprotect",
viewsource: "View source",
whatlinkshere: "What links here"
}
}
/*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 */