notion-enhancer/repo/focus-mode/client.mjs
dragonwocky 9b3cf23b08 extension: focus mode
+ only inject theming css if a theme is enabled, to reduce lag
2021-10-17 22:57:41 +11:00

13 lines
335 B
JavaScript

/*
* notion-enhancer: focus mode
* (c) 2020 Arecsu
* (c) 2021 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (https://notion-enhancer.github.io/) under the MIT license
*/
'use strict';
export default async function (api, db) {
if (await db.get(['padded'])) document.body.dataset.focusMode = 'padded';
}