User:TheTechie/textsize.js

const html = ` Decrease size Current size: Increase size `;

default_size = "0.9em";

$('#bodyContent').prepend(html); $('#bodyContent').css('fontSize', default_size);

var current_size_label = "Current size: " + document.getElementById("bodyContent").style.fontSize; var current_size = parseFloat(document.getElementById("bodyContent").style.fontSize); var label = document.getElementById("size").innerHTML; label = current_size_label; var minimum = 0.7; var maximum = 1.4;

label = current_size_label;

function decreaseSize{ current_size = current_size - 0.1; let size_string = String(current_size) + "em"; $('#bodyContent').css('fontSize', size_string); label = current_size_label; }

function increaseSize{ current_size = current_size + 0.1; let size_string = String(current_size) + "em"; $('#bodyContent').css('fontSize', size_string); label = current_size_label; }