notion-enhancer
Version:
an enhancer/customiser for the all-in-one productivity workspace notion.so
23 lines (19 loc) • 581 B
JavaScript
/**
* notion-enhancer
* (c) 2021 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (https://notion-enhancer.github.io/) under the MIT license
*/
;
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(
/electron_1\.Menu\.setApplicationMenu\(menu\);/g,
'electron_1.Menu.setApplicationMenu(menu); return template;'
)
);
return true;
}