Diferencia entre revisiones de «Usuario:Candalua/common.js»
Contenido eliminado Contenido añadido
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; $... |
(Sin diferencias)
|
Revisión del 20:04 9 nov 2011
// FUNCTIONS TO ENLARGE/REDUCE THE FONT
//default size 100% - range is between 50%-200%
fontSize = 100;
function enlargeFont() {
if (fontSize < 200) {
fontSize += 10;
$(".textBody").css("font-size", fontSize +"%");
}
}
function reduceFont() {
if (fontSize > 50) {
fontSize -= 10;
$(".textBody").css("font-size", fontSize +"%");
}
}
if (wgNamespaceNumber == 0) {
$(document).ready( function() {
mw.util.addPortletLink ('p-displayOptions', 'javascript:enlargeFont()', 'Enlarge font', 'enlarge_font', 'Enlarge the font of the text' );
mw.util.addPortletLink ('p-displayOptions', 'javascript:reduceFont()', 'Reduce font', 'reduce_font', 'Reduce the font of the text' );
//expand as default
$("#p-displayOptions > div.body").show();
});
}