//---------------full script in the link above-----------------
function dispatchkeyboard(key) {
if (key.altKey && key.code === "KeyJ") {
var divfont = document.getElementById("fontSizeSelect");
console.log(divfont);
var inputt = divfont.getElementsByTagName('input')[0];
inputt.select();
inputt.value = "6";
consol.log('done');
var ev = document.createEvent('Event');
ev.initEvent('keypress');
ev.which = ev.keyCode = 13;
console.log(ev);
inputt.dispatchEvent(ev);
}
}
Setting the font size in google doc (very tricky!)
Hi! I've written this script: https://gist.github.com/WiliTest/b78ad2c234565ba8ce40df15440540d9 but I don't find the way to change the font size. The help of a js' Guru would be super!