ui: enhance font selection

This commit is contained in:
undefined committed 2022-02-22 00:43:17 +08:00
1 parent 9b2c36efbf
commit 49a60eeaa1
4 files changed
+7 -2

No files matched your search

@@ -74,6 +74,10 @@ const page = new NamedPage('home_preference', () => {
this.style.fontFamily = this.getAttribute('value');
this.textContent = i18n(this.textContent.trim());
});
function updateFont() {
this.style.fontFamily = $(this).val();
}
$('[name="fontFamily"], [name="codeFontFamily"]').on('change', updateFont).each(updateFont);
});
export default page;