the enhancer is essentially a modloader for notion. this document contains the specifications of how those modules can be made and what they should contain.
this file assumes basic working knowledge of modern javascript and css. since these are the languages executable within the notion app, these are the languages enhancements must be written in.
want to contribute? check the contribution guidelines.
for support, join the discord server.
to understand best how notion’s app works, check out the electron docs, explore the contents of your local extracted app.asar
, and navigate the html structure with the devtools web inspector.
look through the existing modules for examples of the stuff described below in action.
at the moment, for ease of development and use (and security assurance), there’s no way for users to install their own modules. this means that testing modules requires *running a dev build of the enhancer. a better system is in the works.*
once your mod is working, open a pull request to add it to the enhancer!
each directory in the mods
folder is considered a module, with the file entry points mod.js
and styles.css
.
// not valid js!// a visual representation of the contents/type// of this file's exported object.module.exports = { id: String of uuidv4, name: String of short_name, tags?: Array<String> of categories, desc: String of markdown, version: String of semver, author: String of github_username OR { name: String of author_name, link: String of url, avatar: String of image_source, }, options?: Array<{ key: String, label: String, desc?: String, type: String in ['toggle', 'select', 'input', 'file'], value: Boolean or Array<String> or String or Number or null, platformOverwrite?: { darwin?: Boolean or Array<String> or String or Number or null, win32?: Boolean or Array<String> or String or Number or null, linux?: Boolean or Array<String> or String or Number or null, } }>, fonts: Array<String> of font_urls, hacks?: { [k: 'insert-point' (e.g. 'main/createWindow.js')]: function ( store, // used for configuration and persisting of data (explanation below). __exports // module.exports of the target file. if you don't understand that, don't use it. ) {} }};
a module that with the primary function of being a hack should be tagged as an extension, while a module that has the primary function of adding styles should be tagged as a theme.
by default this is assumed to be a github username: just pass it as a string and the link/avatar will be automatically found.
if you’d rather customise this, pass this object: