Diferencia entre revisiones de «Usuario:Candalua/common.js»

Contenido eliminado Contenido añadido
Candalua (Discusión | contribs.)
Sin resumen de edición
Candalua (Discusión | contribs.)
Sin resumen de edición
Línea 2:
 
self.ws_messages = {
'optlist': 'Display options',
'enlarge_fonttext_size': 'EnlargeText textsize:',
'reduce_fontenlarge_font': 'Reduce font+',
'reduce_font': '-',
'enlarge_font_tooltip': 'Enlarge the size of the text',
'reduce_font_tooltip': 'Reduce the size of the text'
}
 
Línea 32 ⟶ 33:
get_optlist();
$('#optlist').append('<li id="text_size"></li>');
enlargeLink = mw.util.addPortletLink ('p-displayOptions', '#', ws_msg('enlarge_font'), 'enlarge_font', ws_msg('enlarge_font_tooltip') );
$('#text_size').append(ws_msg('text_size'));
reduceLink = mw.util.addPortletLink ('p-displayOptions', '#', ws_msg('reduce_font'), 'reduce_font', ws_msg('reduce_font_tooltip') );
$('#text_size').append('<a href="#" id="enlarge_font" title="' + ws_msg('enlarge_font_tooltip') + '">' + ws_msg('enlarge_font') + '</a>');
$('#text_size').append('<a href="#" id="reduce_font" title="' + ws_msg('reduce_font_tooltip') + '">' + ws_msg('reduce_font') + '</a>');
 
// Bind click handlers
$(enlargeLink'#enlarge_font').click( function( e ) {
e.preventDefault();
enlargeFont();
});
$(reduceLink'#reduce_font').click( function( e ) {
e.preventDefault();
reduceFont();
Línea 46 ⟶ 49:
 
//expand as default
$("#p-displayOptions").removeClass('collapsed').addClass('expanded')
$("#p-displayOptions > div.body").show();
});