Nota: Después de publicar, quizás necesite actualizar la caché de su navegador para ver los cambios.
- Firefox/Safari: Mantenga presionada la tecla Shift mientras pulsa el botón Actualizar, o presiona Ctrl+F5 o Ctrl+R (⌘+R en Mac)
- Google Chrome: presione Ctrl+Shift+R (⌘+Shift+R en Mac)
- Internet Explorer/Edge: mantenga presionada Ctrl mientras pulsa Actualizar, o presione Ctrl+F5
- Opera: Presiona Ctrl+F5.
/*Cualquier código JavaScript escrito aquí se cargará para todos los usuarios en cada carga de página.*/
/*Resúmenes de edición predefinidos*/
window.dev = window.dev || {};
window.dev.editSummaries = {
css: '#stdSummaries { width: 264px }',
select: 'MediaWiki:Standard Edit Summary'
};
/*Nombre de usuario - usado por Plantilla:NOMBREUSUARIO*/
$(function() {
if (window.disableUsernameReplace || mw.config.get('wgUserName') === null) return;
$('span.insertusername').html(mw.config.get('wgUserName'));
});
/*Emotes en el wiki - usado por Plantilla:Emote - por Bobogoobo*/
if ($('.emote-template').length || $('#WikiaArticleComments').length) {
$(function() {
function emotify($this) {
var emote = $this.text();
var url = emotes.match(
new RegExp('\\n\\*\\s*(.*)\\n(?:\\*\\*.*\\n)*(?=.*' +
emote.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, '\\$1') + //escape specials, from MDN
')', 'i'));
if (url) {
url = url[1];
$this.html($('<img />', {'src':url, 'alt':emote, 'height':19, 'width':19 }));
}
}
var emotes = '';
$.getJSON('/api.php?action=query&prop=revisions&titles=MediaWiki:Emoticons' +
'&rvprop=content&format=json', function(data) {
emotes = data.query.pages['118095'].revisions[0]['*'];
$('.emote-template').each(function() {
emotify($(this));
});
});
$('#WikiaArticleFooter').on('DOMNodeInserted', function() {
if ($('.emote-template').length === $('.emote-template img').length) {
return;
}
$('#WikiaArticleFooter .emote-template').each(function() {
if (!($(this).children('img').length)) {
emotify($(this));
}
});
});
});
}