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

Contenido eliminado Contenido añadido
Candalua (Discusión | contribs.)
Página nueva: // FUNCTIONS TO ENLARGE/REDUCE THE FONT //default size 100% - range is between 50%-200% fontSize = 100; function enlargeFont() { if (fontSize < 200) { fontSize += 10; $...
 
Candalua (Discusión | contribs.)
Sin resumen de edición
Línea 1:
// FUNCTIONS TO ENLARGE/REDUCE THE FONT
 
self.ws_messages = {
'optlist':'Display options',
}
 
 
//default size 100% - range is between 50%-200%
fontSize = 100;
Línea 21 ⟶ 27:
$(document).ready( function() {
get_optlist();
mw.util.addPortletLink ('p-displayOptions', 'javascript:enlargeFont()', 'Enlarge font', 'enlarge_font', 'Enlarge the font of the text' );
enlargeLink = mw.util.addPortletLink ('p-displayOptions', 'javascript:reduceFont()#', 'ReduceEnlarge font', 'reduce_fontenlarge_font', 'ReduceEnlarge the font of the text' );
reduceLink = mw.util.addPortletLink ('p-displayOptions', 'javascript:enlargeFont()#', 'EnlargeReduce font', 'enlarge_fontreduce_font', 'EnlargeReduce the font of the text' );
 
//expand as default
Línea 28 ⟶ 35:
});
}
 
// Bind click handlers
$(enlargeLink).click( function( e ) {
e.preventDefault();
enlargeFont();
});
$(reduceLink).click( function( e ) {
e.preventDefault();
reduceFont();
});