mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-13 08:39:02 +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
|
||||||
? 'enabled'
|
? 'enabled'
|
||||||
: 'disabled';
|
: '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();
|
search();
|
||||||
modified();
|
modified();
|
||||||
});
|
});
|
||||||
|
@ -14,6 +14,12 @@ module.exports = {
|
|||||||
version: require('../../package.json').version,
|
version: require('../../package.json').version,
|
||||||
author: 'dragonwocky',
|
author: 'dragonwocky',
|
||||||
options: [
|
options: [
|
||||||
|
{
|
||||||
|
key: 'autoresolve',
|
||||||
|
label: 'auto-resolve theme conflicts',
|
||||||
|
type: 'toggle',
|
||||||
|
value: false,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: 'openhidden',
|
key: 'openhidden',
|
||||||
label: 'hide app on open',
|
label: 'hide app on open',
|
||||||
|
Loading…
Reference in New Issue
Block a user