mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-05 13:19:03 +00:00
#192 remove draggable-indicator dots from tabs ext. in menu
This commit is contained in:
parent
bc46ac39b0
commit
9597dcc4d5
@ -44,23 +44,6 @@ window['__start'] = async () => {
|
|||||||
: store(args[0], { ...mod.defaults, ...args[1] });
|
: store(args[0], { ...mod.defaults, ...args[1] });
|
||||||
};
|
};
|
||||||
|
|
||||||
for (let mod of modules.loaded) {
|
|
||||||
if (
|
|
||||||
mod.alwaysActive ||
|
|
||||||
store('mods', { [mod.id]: { enabled: false } })[mod.id].enabled
|
|
||||||
) {
|
|
||||||
const fileExists = (file) => fs.pathExistsSync(path.resolve(file));
|
|
||||||
for (let sheet of ['menu', 'variables']) {
|
|
||||||
if (fileExists(`${__dirname}/../${mod.dir}/${sheet}.css`)) {
|
|
||||||
document.head.appendChild(
|
|
||||||
createElement(
|
|
||||||
`<link rel="stylesheet" href="enhancement://${mod.dir}/${sheet}.css">`
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
electron.ipcRenderer.send('enhancer:get-app-theme');
|
electron.ipcRenderer.send('enhancer:get-app-theme');
|
||||||
electron.ipcRenderer.on('enhancer:set-app-theme', (event, theme) => {
|
electron.ipcRenderer.on('enhancer:set-app-theme', (event, theme) => {
|
||||||
document.body.className = `notion-${theme}-theme`;
|
document.body.className = `notion-${theme}-theme`;
|
||||||
@ -509,15 +492,10 @@ window['__start'] = async () => {
|
|||||||
return $opt;
|
return $opt;
|
||||||
}
|
}
|
||||||
|
|
||||||
const $modules = document.querySelector('#modules');
|
const $modules = document.querySelector('#modules'),
|
||||||
|
fileExists = (file) => fs.pathExistsSync(path.resolve(file));
|
||||||
|
|
||||||
for (let mod of modules.loaded) {
|
for (let mod of modules.loaded) {
|
||||||
for (let font of mod.fonts || []) {
|
|
||||||
document
|
|
||||||
.querySelector('head')
|
|
||||||
.appendChild(createElement(`<link rel="stylesheet" href="${font}">`));
|
|
||||||
}
|
|
||||||
|
|
||||||
const enabled =
|
const enabled =
|
||||||
mod.alwaysActive ||
|
mod.alwaysActive ||
|
||||||
store('mods', {
|
store('mods', {
|
||||||
@ -531,8 +509,21 @@ window['__start'] = async () => {
|
|||||||
link: `https://github.com/${mod.author}`,
|
link: `https://github.com/${mod.author}`,
|
||||||
avatar: `https://github.com/${mod.author}.png`,
|
avatar: `https://github.com/${mod.author}.png`,
|
||||||
};
|
};
|
||||||
|
if (enabled) {
|
||||||
|
for (let sheet of ['menu', 'variables']) {
|
||||||
|
if (fileExists(`${__dirname}/../${mod.dir}/${sheet}.css`)) {
|
||||||
|
document.head.appendChild(
|
||||||
|
createElement(
|
||||||
|
`<link rel="stylesheet" href="enhancement://${mod.dir}/${sheet}.css">`
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
mod.elem = createElement(`
|
mod.elem = createElement(`
|
||||||
<section class="${enabled ? 'enabled' : 'disabled'}" id="${mod.id}">
|
<section class="${enabled ? 'enabled' : 'disabled'}${
|
||||||
|
mod.tags.includes('core') ? ' core' : ''
|
||||||
|
}" id="${mod.id}">
|
||||||
<div class="meta">
|
<div class="meta">
|
||||||
<h3 ${
|
<h3 ${
|
||||||
mod.alwaysActive
|
mod.alwaysActive
|
||||||
|
@ -663,10 +663,10 @@ svg[data-tooltip] {
|
|||||||
.reorder #modules .version {
|
.reorder #modules .version {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.reorder #modules label {
|
.reorder #modules .core .toggle * {
|
||||||
cursor: pointer;
|
cursor: text;
|
||||||
}
|
}
|
||||||
.reorder #modules label::before {
|
.reorder #modules section:not(.core) label::before {
|
||||||
content: '::';
|
content: '::';
|
||||||
margin-right: 0.4em;
|
margin-right: 0.4em;
|
||||||
color: var(--theme--text_ui);
|
color: var(--theme--text_ui);
|
||||||
|
Loading…
Reference in New Issue
Block a user