1995eaton / chromium-vim

Vim bindings for Google Chrome.
https://chrome.google.com/webstore/detail/cvim/ihlenndgcmojhcghmfjfneahoeklbjjh
MIT License
2.25k stars 326 forks source link

set font #757

Open gh1232 opened 1 year ago

gh1232 commented 1 year ago

is it possible to do these:

map 1 set font.minimum-size.x-western = 24

map 8 set font.name-list.serif.x=western = "lucinda"

i would like to change font and font size on various sites i visit

thanks

b-coimbra commented 1 year ago

There's no feature that allows you to change a website's font afaik.

You'd be better off creating a userscript for that.

const keymaps = {
    1: () => setFontSize(24),
    8: () => setFontFamily('lucinda')
};

const setFontSize   = (pt)   => document.body.style.fontSize = `${pt}pt`;
const setFontFamily = (font) => document.body.style.fontFamily = font;

onload = () => onkeyup = ({ key }) => keymaps[key]?.();