mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-06 21:49:03 +00:00
auto-resolve conflicts core option
This commit is contained in:
parent
c0f847949f
commit
f3eda9a34b
@ -542,6 +542,27 @@ window['__start'] = async () => {
|
||||
].enabled
|
||||
? 'enabled'
|
||||
: 'disabled';
|
||||
if (
|
||||
$enable.checked &&
|
||||
coreStore().autoresolve &&
|
||||
mod.tags.includes('theme')
|
||||
) {
|
||||
modules.loaded.forEach((other) => {
|
||||
const $other_enable = other.elem.querySelector(
|
||||
`#enable_${other.id}`
|
||||
);
|
||||
if (
|
||||
other !== mod &&
|
||||
$other_enable &&
|
||||
$other_enable.checked &&
|
||||
other.tags.includes('theme')
|
||||
) {
|
||||
for (let mode of ['dark', 'light'])
|
||||
if (other.tags.includes(mode) && mod.tags.includes(mode))
|
||||
$other_enable.click();
|
||||
}
|
||||
});
|
||||
}
|
||||
search();
|
||||
modified();
|
||||
});
|
||||
|
@ -14,6 +14,12 @@ module.exports = {
|
||||
version: require('../../package.json').version,
|
||||
author: 'dragonwocky',
|
||||
options: [
|
||||
{
|
||||
key: 'autoresolve',
|
||||
label: 'auto-resolve theme conflicts',
|
||||
type: 'toggle',
|
||||
value: false,
|
||||
},
|
||||
{
|
||||
key: 'openhidden',
|
||||
label: 'hide app on open',
|
||||
|
Loading…
Reference in New Issue
Block a user