mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-10 23:39:03 +00:00
patch systemMenu: mod window menu template
This commit is contained in:
parent
9bf68ca679
commit
e4943d9abb
@ -18,6 +18,8 @@ a complete redesign & rewrite of the enhancer, with new features and a port to t
|
|||||||
- an icon sets option to encode images to data urls to prevent quality reduction.
|
- an icon sets option to encode images to data urls to prevent quality reduction.
|
||||||
- customisation of integrated titlebar & always on top window buttons.
|
- customisation of integrated titlebar & always on top window buttons.
|
||||||
- an open on startup option under the tray mod.
|
- an open on startup option under the tray mod.
|
||||||
|
- optional icon or title-only tab labels.
|
||||||
|
- choice of tab layout styles: traditional tabbed, traditional, bubble and compact.
|
||||||
|
|
||||||
#### improved
|
#### improved
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit b98db17e400ec8ba1cd41185a3e9995fedd41c48
|
Subproject commit 069a17207a45c6e13af7c884b5ff67fa9f195543
|
@ -1 +1 @@
|
|||||||
Subproject commit 94e069426beeb7e90cd7a5df55b6499353028163
|
Subproject commit 4817c105ffd8f8db9663ef5d5ba1f19bd6b95dd0
|
22
pkg/replacers/main/systemMenu.js
Normal file
22
pkg/replacers/main/systemMenu.js
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/**
|
||||||
|
* notion-enhancer
|
||||||
|
* (c) 2021 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
|
||||||
|
* (https://notion-enhancer.github.io/) under the MIT license
|
||||||
|
*/
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
import fsp from 'fs/promises';
|
||||||
|
|
||||||
|
export default async function (filepath) {
|
||||||
|
// so that e.g. tabs access and modify the template
|
||||||
|
const contents = await fsp.readFile(filepath, 'utf8');
|
||||||
|
await fsp.writeFile(
|
||||||
|
filepath,
|
||||||
|
contents.replace(
|
||||||
|
/\}\nexports\.setupSystemMenu = setupSystemMenu;/g,
|
||||||
|
'return template;}\nexports.setupSystemMenu = setupSystemMenu;'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return true;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user