Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/* Any JavaScript here will be loaded for all users on every page load. */
/* Message Wall tags */
window.MessageWallUserTags = {
tagColor: '#006CB0',
glow: false,
glowSize: '15px',
glowColor: '#006CB0',
users: {
'Lythronax': 'ADMIN',
'Bacner': 'ADMIN',
'Collector1': 'ADMIN',
}
};
importArticles({
type: 'script',
articles: [
'u:dev:MessageWallUserTags/code.js',
]
});
window.UserTagsJS = {
modules: {},
tags: {}
};
UserTagsJS.modules.inactive = 30;
UserTagsJS.modules.newuser = true;
UserTagsJS.modules.autoconfirmed = true;
// NOTE: bannedfromchat displays in Oasis but is not a user-identity group so must be checked manually
UserTagsJS.modules.mwGroups = ['bureaucrat', 'chatmoderator', 'patroller', 'rollback', 'sysop', 'bannedfromchat', 'bot', 'bot-global'];
UserTagsJS.modules.metafilter = {
sysop: ['bureaucrat', 'founder'],
bureaucrat: ['founder'],
chatmoderator: ['sysop', 'bureaucrat']
};
importArticle({type:'script', article:'w:c:dev:UserTags/code.js'});
/* <pre> */
// ============================================================
// Standard edit summaries
// Source Editor - Original with slight label change
// Visual Editor - Modified by Casualty Wiki from here
// with slight label change
// Credits to Eladkse of Casualty Wiki
// ============================================================
// ====================
// Source Editor
// ====================
$(function() {
if (skin == 'oasis'){
var $label = $('#edit_enhancements_toolbar #wpSummaryLabel');
if (!$label.size()) {
return;
}
}
if (skin == 'monobook'){
var $label = $('.editOptions #wpSummaryLabel');
if (!$label.size()) {
return;
}
}
$combo = $('<select />').attr('id', 'stdSummaries').change(function() {
var val = $(this).val();
if (val != '') {
$('#wpSummaryEnhanced,#wpSummary').val(val);
}
});
$label.prepend('<br />').prepend($combo).prepend('Summaries: ');
$.ajax({
'dataType': 'text',
'data': {
'title': 'MediaWiki:Edit Summaries',
'action': 'raw',
'ctype': 'text/plain'
},
'url': wgScript,
'success': function(data) {
var lines = data.split("\n");
for (var i in lines) {
var val = (lines[i].indexOf('-- ') == 0) ? lines[i].substring(3) : '';
var text = (lines[i].indexOf('-- ') == 0) ? ' ' + lines[i].substring(3) : lines[i];
var disable = (lines[i].indexOf('-- ') == 0 || lines[i].indexOf('(') == 0) ? '' : 'disabled';
var $opt = '<option value="' + val + '" ' + disable + '>' + text + '</option>';
$combo.append($opt);
}
}
});
})
// ====================
// Visual Editor
// ====================
$(function() {
var $label = $('.module_content #wpSummaryLabel');
if (!$label.size()) {
return;
}
$combo = $('<select />').attr('id', 'stdSummaries').change(function() {
var val = $(this).val();
if (val != '') {
$('#wpSummaryEnhanced,#wpSummary').val(val);
}
});
$label.after($combo);
$.ajax({
'dataType': 'text',
'data': {
'title': 'MediaWiki:Edit Summaries',
'action': 'raw',
'ctype': 'text/plain'
},
'url': wgScript,
'success': function(data) {
var lines = data.split("\n");
for (var i in lines) {
var val = (lines[i].indexOf('-- ') == 0) ? lines[i].substring(3) : '';
var text = (lines[i].indexOf('-- ') == 0) ? ' ' + lines[i].substring(3) : lines[i];
var disable = (lines[i].indexOf('-- ') == 0 || lines[i].indexOf('(') == 0) ? '' : 'disabled';
var $opt = '<option value="' + val + '" ' + disable + '>' + text + '</option>';
$combo.append($opt);
}
}
});
$('.module_content #wpSummary').css({"margin-bottom": '8px'});
$('.module_content #stdSummaries').css({"width": '258px'});
$('.module_content #stdSummaries').css({"margin-bottom": '5px'});
})
/* </pre> */
var ArchiveToolConfig = {
archiveListTemplate: 'ArchCat',
archivePageTemplate: 'ArchPage',
archiveSubpage: 'Archive',
userLang: true
};
importScriptPage('ArchiveTool/code.js', 'dev');
importScriptPage('DupImageList/code.js', 'dev');
importArticles({
type: 'script',
articles: [
'u:dev:QuickDelete/code.js',
]
});