update font styling loop

This commit is contained in:
Emir 2020-12-06 01:36:47 +03:00 committed by GitHub
parent b07e9863f5
commit aab6b83eb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -62,18 +62,10 @@ module.exports = {
clearInterval(attempt_interval);
for (let style of ['sans', 'serif', 'mono', 'code', 'quote', 'headings']) {
if (!store()[style]) continue;
if (style == 'headings') {
for (let heading of ['heading1', 'heading2', 'heading3']) {
document
.querySelector('.notion-app-inner')
.style.setProperty(`--theme--font_${heading}`, store()[style]);
}
} else {
document
.querySelector('.notion-app-inner')
.style.setProperty(`--theme--font_${style}`, store()[style]);
}
document
.querySelector('.notion-app-inner')
.style.setProperty(`--theme--font_${style}`, store()[style]);
}
}
},