Compare commits

...

1020 Commits
v0.10.2 ... dev

Author SHA1 Message Date
dae9700b0b
chore: add directoryMode flag to enhanceApp for notion-repackaged 2024-11-19 21:48:56 +11:00
9f8d9030ae
feat(indent-guides): alternating indentation guide colours 2024-11-19 21:22:41 +11:00
e4d335919d
chore: move notion-enhancer btn to bottom of sidebar 2024-11-19 11:29:54 +11:00
42bb015384
feat: port across indent guides (formerly indentation lines) 2024-11-18 22:46:01 +11:00
8e9dcfac95
fix(outliner): correctly indent h1 > h3 > h2 heading sequences 2024-11-18 21:06:24 +11:00
7ad446ade8
fix(topbar): disable always on top in browser 2024-11-18 21:05:28 +11:00
d651b5ceea
feat(outliner): hide builtin floating toc when outliner is enabled 2024-11-15 15:03:41 +11:00
7dde3b8b3c
chore: notion v4.0.0 compat
use https://www.notion.so/api/__notion-enhancer for internal asset proxy
2024-11-15 14:41:02 +11:00
d5e0810915
fix: sidebar button appending
settings button has been moved into the workspace/acct dropdown
2024-07-19 21:11:27 +10:00
7fe9bb2543
fix: remove csp headers in notion desktop 2024-06-05 21:00:53 +10:00
d459455f3d
fix: adjust floating button position 2024-06-02 14:09:27 +10:00
d8bc86c943
chore: add prerelease message 2024-06-02 13:58:06 +10:00
9b36ca26b2
chore: disable telemetry, remove sponsor perks (temp) 2024-06-02 13:13:06 +10:00
c8613d0937
chore: update material ocean theme 2024-06-02 13:00:03 +10:00
af95a0bf49
style(tweaks): rounded & bubble tab styles 2024-05-30 16:24:52 +10:00
df63bef8bc
style(tweaks): default img alignment, responsive columns, disable sidebar resizing 2024-05-30 15:45:06 +10:00
43c3b1bbca
style(tweaks): update typography + page tweaks, add compact code blocks 2024-05-30 00:07:22 +10:00
daee8c70f5
chore: deprecate truncated-titles 2024-05-29 22:07:10 +10:00
2365b9043c
style(tweaks): hide slash menu, placeholders & default icons 2024-05-29 21:47:17 +10:00
a09e6abff7
fix: re-add topbar buttons after visiting home 2024-05-29 18:27:25 +10:00
72e5302c61
fix: position floating buttons correctly on load if help is hidden 2024-05-29 18:19:54 +10:00
35f243b032
style(tweaks): hide floating button 2024-05-29 12:45:45 +10:00
e25f2db188
fix(word-counter): #761 count words using chars outside latin alphabet 2024-05-28 23:01:07 +10:00
ec738cd03f
fix(right-to-left): preserve order of table cells with rtl
otherwise cells reverse on hover / do not sync between header and rows
2024-05-28 22:28:21 +10:00
fffc0c16d1
fix(right-to-left): #828 dir=auto per-element under toggle, not whole block 2024-05-28 22:02:06 +10:00
058f63c8e9
fix(right-to-left): #905 enable rtl in comments section 2024-05-28 21:39:30 +10:00
6ceca21be3
feat(right-to-left): update api compat, rtl + right-indent tocs 2024-05-28 21:30:57 +10:00
f2128fbf10
feat(line-numbers): border & bg decoration styles 2024-05-28 20:59:46 +10:00
75a864db8c
chore(line-numbers): granular dom updates 2024-05-28 00:36:23 +10:00
493ab5aa63
fix: handle mod errors individually, soft fail 2024-05-27 22:06:14 +10:00
71ed1ddb1f
feat(tweaks): normalised database scrolling 2024-05-27 22:05:46 +10:00
6dce77714e
feat(line-numbers): calc size + pos of numbers for wrapped code
- fix: #900, #897
- todo: optimise
- todo: re-implement styles/opts
2024-05-23 00:25:34 +10:00
6e80cf77b5
fix(scroller): handle repeated 'today' button clicks 2024-05-12 11:55:23 +10:00
bbc8c7a1e0
fix: replace .notion-help-button with .notion-ai-button 2024-05-12 11:25:02 +10:00
47cfece013
feat: update focus (focus-mode) extension 2024-04-28 00:01:12 +10:00
26cbdf7e2e
feat: update fonts extension, add option for math font
remove font vars from theme css, fonts can now only be controlled via font chooser
2024-04-25 23:59:56 +10:00
1576680a66
chore: remove outdated extension thumbnails 2024-04-23 16:59:07 +10:00
73665e9743
feat: update no-peeking extension (formerly bypass-preview) 2024-04-23 16:52:57 +10:00
5b22ca9ff9
chore: deprecate collapsible-properties, global-block-links, weekly-view 2024-04-23 15:33:16 +10:00
5f958726d9
feat(scroller): add calendar scroll functionality to 'Today' button 2024-04-23 15:13:05 +10:00
8ea6ef30ff
chore: update lucide to v0.372.0, unocss to v0.59.4, coloris to v0.24.0 2024-04-23 13:45:59 +10:00
f0d7d89653
fix: position floating buttons relative to help button without wrapping it
(changing help button dom parent makes notion error when inserting elements relative to it)
2024-04-23 13:36:56 +10:00
222d544f88
fix: add .js to electronScripts paths so they actually load in 2024-04-22 23:06:07 +10:00
71f9ecc32b
feat: custom userscripts in-app and in-browser!
firefox support will involve some tweaking, manifest v3 not fully supported yet
2024-04-22 22:58:50 +10:00
607fcee4f8
chore(tweaks): add tweaks + descriptions to updated mod.json 2024-04-21 19:08:38 +10:00
3d7efbef54
fix(cli): remove dup. message if already enhanced 2024-04-21 17:01:30 +10:00
9b03b1d9f7
chore: remove integrated-titlebar (default in notion desktop v3.4.0) 2024-04-21 16:56:09 +10:00
736292e1b8
chore: update sidebar button styles to match notion 2024-04-21 16:32:26 +10:00
a4b1e6e5f2
feat(cli): repack enhanced sources into app.asar 2024-04-21 15:45:29 +10:00
23ea8c1c55
chore: remove draggable tabs toggle (now enabled by default in vanilla) 2024-02-24 23:41:20 +11:00
b910f82acf
fix(panel): switch between multiple views correctly
update single select instance to avoid conflicting rerender listeners
2024-02-24 23:36:43 +11:00
951b199b54
fix(word-counter): handle singular vs. plural stats appropriately 2024-02-24 21:05:48 +11:00
44c480062b
chore: update to support notion 2.3.1 (regex-based replacement for updated webpack bundles)
removed use strict from mjs files, where strict mode is assumed/enforced regardless
2024-02-24 20:57:22 +11:00
ef09280f61
chore: ensure api is loaded before mod scripts execute 2024-02-19 23:08:09 +11:00
1f717b98ca
chore: simplify api imports 2024-02-17 00:27:35 +11:00
f0e2570448
chore: switch to unocss for styling
faster + more powerful + better documented + more active than twind. sticking with custom preset-icons to avoid fetching over cdn + to load custom icons
2024-02-16 18:16:58 +11:00
7fe993d356
feat: add scroll to bottom button #861 2024-02-13 21:41:35 +11:00
f32cf56a67
feat: show scroll progress in outliner #834, fix: jump to headings in columns 2024-02-09 15:06:34 +11:00
d156d810ba
feat: make peak panel on hover configurable 2024-02-09 13:46:10 +11:00
Tom
ad2c2cf199
feat: add "hide default page icons" tweak
merge pull request #819 from @1280px
2024-02-07 11:48:45 +11:00
9a7a814ab8
feat: port word counter extension 2024-02-05 15:43:06 +11:00
3601680c24
fix(topbar): custom topbar icons + window dragging in peek view
i have discovered that extra topbar icons e.g. window min/max/close are not accessible in peek mode. this is probably fine?
2024-02-05 12:59:58 +11:00
6bfe1d8b07
fix(outliner): render tex equations nicely 2024-02-05 12:42:23 +11:00
beb5873788
fix: set exact panel view height to prevent overflow 2024-01-31 23:38:44 +11:00
d8b6aef698
chore: update word counter mod.json w/ configurable speeds 2024-01-31 23:29:46 +11:00
b55e74a2c5
fix: more reliable scroll to top btn initial display + positioning 2024-01-31 23:16:43 +11:00
ba8c660442
feat: scroll to heading on click in outliner 2024-01-31 23:02:04 +11:00
6661c5559b
feat: render headings in outliner 2024-01-31 00:12:14 +11:00
ff1e5f7550
chore: update lucide 2024-01-30 22:37:30 +11:00
c4eacd201c
style: implement size- utility 2024-01-30 22:37:30 +11:00
Tom
4e1a28df3d
#814 standardise outliner indentation
merge pr from @achiyae
2024-01-30 22:28:24 +11:00
d420b2de4e
feat: conditional display of scroll to top btn 2024-01-30 17:57:03 +11:00
twelve eighty pix
848cd86b90
Add "hide default page icons" option 2024-01-26 23:08:41 +07:00
42b2fedacf
feat: add scroll to top button (wip) 2024-01-25 13:14:48 +11:00
aae4c7e663
chore: perf optimisations, overflow topbar to the left when comments & updates sidebars are open 2024-01-25 11:44:28 +11:00
1a709f5a84
feat: merge and update topbar-icons and always-on-top 2024-01-25 00:27:52 +11:00
4df00ca870
feat(titlebar): customisable window control button icons 2024-01-24 15:08:56 +11:00
6e9f0a420f
feat(titlebar): handle window button clicks 2024-01-24 14:46:52 +11:00
f085362774
fix(menu): hide titlebar extension if in browser 2024-01-24 13:21:09 +11:00
54594350bd
fix: no more menu skeleton fouc 2024-01-24 13:09:54 +11:00
ff002044aa
fix: use leading edge debounce to sync up transitions 2024-01-24 12:50:13 +11:00
26c9638013
fix(panel): dont move help button unless panel is pinned 2024-01-24 02:27:53 +11:00
653d7d9bc8
feat(titlebar): render window controls in tabbar if active, otherwise in topbar 2024-01-24 02:24:56 +11:00
346b61eff4
feat(titlebar): make frameless window draggable (w/out extra dragarea) 2024-01-23 23:14:08 +11:00
77322fc8ad
feat: implement frameless windows, fix: smooth out menu transitions 2024-01-23 14:30:47 +11:00
db0f3c5228
chore: remove tray and tabs extensions 2024-01-23 13:16:21 +11:00
bbb60ae76f
feat: toggle window hotkey, reorderable tabs, dev mode
(merged tray & tabs extensions into the core now that the official notion app includes tray & tabs implementations
2024-01-21 00:24:38 +11:00
23f8e3b560
feat(panel): add tooltips to panel toggles 2024-01-20 23:58:12 +11:00
68b73246fb
chore: minor refactoring 2024-01-20 19:48:07 +11:00
69eb2866d5
fix(panel): queue panel close after peek animation ends if no longer hovering 2024-01-18 16:20:18 +11:00
493db7aa2e
fix(panel): debounce peek trigger
e.g. do not show if mouse is moved quickly out of the window
2024-01-18 16:01:46 +11:00
c722c7f854
fix(panel): reliable/not-weird panel animations 2024-01-18 15:32:58 +11:00
a2efca4ca6
feat(panel): peek panel on hover near edge of screen
- regular toggle animation now slightly messed up
- todo make this configurable
2024-01-16 23:47:30 +11:00
Achiya Elyasaf
5ceec8eabf
Update client.mjs
Removed the depth variable that is no longer needed.
2023-11-26 20:38:26 +02:00
Achiya Elyasaf
f7fdb38c8c
Update client.mjs
Fix issue #813 with the outliner extension.
Instead of inc-/dec- rementing the indentation by 18 each iteration, the fix multiplies the header level by 18. This way, jumping from level 3 to level 1 results in the correct indentation,
2023-11-15 09:39:42 +02:00
a88c45cc80
chore: update to support notion 2.2.4 (bundled webpack build) 2023-10-29 20:16:56 +11:00
8ec6094caf
chore(panel): restore cloudhill credit 2023-09-04 22:29:11 +10:00
aed0081990
fix(panel): restore resizeability
css width var had been applied to panel and to panel parent separately, freezing the panel at an initial pos
2023-08-16 00:45:33 +10:00
a75a2d2608
chore: rm old panel srcs, move not-yet-ported srcs to archive folder 2023-08-16 00:30:16 +10:00
319db04403
feat(panel): disable panel if no views available 2023-08-16 00:22:20 +10:00
463607c6d2
feat(panel): register/render custom views to side panel
+ fix: debounce useState callback triggers to prevent over-handling conflicts
+ minor refactoring
2023-08-15 23:55:43 +10:00
608b8d42d4
fix: set min widths on panel content to prevent layout shift on toggle 2023-08-11 00:15:48 +10:00
9f998b5320
feat(menu, panel): improved keyboard navigation for selects + inputs 2023-08-10 23:38:32 +10:00
8745dc9313
feat(panel): render icons in switcher 2023-08-09 23:59:18 +10:00
681d5c13f6
feat(panel): open panel switcher as dropdown 2023-08-09 00:01:10 +10:00
0ad2b2ff54
feat(panel): add wip select to top of panel
- todo: display popup beneath select
- todo: dynamically register values
- todo: add icons
- todo: change view on select change
2023-08-07 12:50:37 +10:00
09b24147c5
fix: delay menu open until dom is ready to preserve transition 2023-08-07 11:48:29 +10:00
1d501dffa5
fix: close panel on handle click only if not dragged, inc. panel transition to 300ms 2023-08-07 00:09:47 +10:00
95483f4f25
fix: wait for api b4 hooking into state 2023-08-06 23:57:37 +10:00
45e0be7d62
refactor: move state.mjs into markup.mjs for use in notion interface 2023-08-06 23:45:56 +10:00
bb5853e866
feat(panel): add open/close gui buttons 2023-08-05 01:09:01 +10:00
94460375bf
feat: make side panel resizeable 2023-08-04 23:59:37 +10:00
8d679ae3c5
feat: add toggleable side panel w/ hotkey + tooltip 2023-08-04 22:46:53 +10:00
19e6d5451c
fix: only re-import dom modules in menu, don't use until post-re-import 2023-08-04 16:14:04 +10:00
4f07420c4a
feat(core): implement dev mode toggle in electron app
+ refactor: merge components/ into islands/ for consistency
2023-08-04 13:13:06 +10:00
e762e68f7f
chore: don't patch forge.config.js (may be useful for notion-repackaged?) 2023-08-04 13:11:32 +10:00
9a1b35afd9
fix(browser): handle port disconnection b/w client and worker 2023-08-03 22:34:18 +10:00
025bbca44c
fix: more resilient ipc for db operations, proper fallback handling
+ minor refactoring of files from api/ to shared/
+ adjusting wording of onboarding terms
+ inject menu button b/w the `settings & members` and the `new page` buttons
2023-08-03 18:26:16 +10:00
a88c74d1c3
chore: update deps 2023-07-31 23:08:14 +10:00
a65fb79878
fix: disable guardAgainstIFrameRequests to enable menu embed 2023-07-31 23:05:02 +10:00
705ba509cb
fix: do not inject to sqlite srcs, fixes infinite loading 2023-07-31 00:54:46 +10:00
f61d13ca91
fix(cli): make args["--json"] state available to print funcs 2023-07-31 00:53:30 +10:00
d3840c5922
???: ...and it doesn't work. i will look at this again later 2023-05-07 23:08:38 +10:00
bf07257ae8
wip: migrate db ops to use ipc (nodeintegration is disabled in latest app) 2023-05-07 22:37:56 +10:00
8e809d4233
fix(theme): stop bg-hover selector targeting checkboxes 2023-03-19 21:27:20 +11:00
2ac684056a
style(menu): round sidebar buttons, update heading styles 2023-03-19 19:50:16 +11:00
38b056429e
feat(menu): indicate upload status of file inputs with label change 2023-03-19 18:43:57 +11:00
5a91e58104
feat(telemetry): send weekly pings if enabled 2023-03-19 15:02:47 +11:00
3e379f44e8
fix: enable telemetry by default 2023-02-04 13:41:14 +11:00
0fff732fd9
chore(menu): remove option type demos, fix(menu): support mods without options, feat(menu): override heading autoremove 2023-02-04 13:34:49 +11:00
809b59ebb1
chore: update onboarding disclaimer, unify telemetry handling, detect firefox vs chromium 2023-02-04 13:10:12 +11:00
374efd3458
draft(menu): featured sponsors spot 2023-02-04 10:48:20 +11:00
6519f501d3
fix: move nord/neutral to themes folder, reword sponsor perks, dont trigger reload btn when agreeing to privacy policy 2023-02-03 21:10:50 +11:00
a6e9504b6f
chore(menu): detect db update by comparing against prev value
- syncs reload btn visibility b/w tabs
- doesn't trigger when switching profiles if identical
2023-02-03 13:04:12 +11:00
ba98ed6412
chore: refactor core/client.mjs, sync telemetry opt-in/out across profiles 2023-02-03 11:52:51 +11:00
3cd8ed7703
feat(menu): indicate updates with popup & notification pings 2023-02-03 01:01:11 +11:00
0daf0a38c2
style(menu): set landing tile bg to bg-secondary for consistency with mod tiles 2023-01-31 22:26:24 +11:00
5640b12139
chore: update vendored deps 2023-01-31 22:17:46 +11:00
f1332fffbd
feat(onboarding): require agreement to privacy policy + ts & cs, add landing tiles 2023-01-31 22:12:29 +11:00
567e678a6f
chore(menu): add telemetry toggle 2023-01-30 23:11:55 +11:00
f999969c13
chore!: store config in electron-defined userData folder instead of home folder
- cli can no longer detect where config will be, so config-related cli prompts have been removed
- should avoid file conflicts and enable portable builds
- users can export their data in the more readable .json format from the profiles section of the menu and no longer require direct access to the config file
2023-01-29 16:07:26 +11:00
f61ac3d8d9
feat(menu): add sponsorship buttons & perks to banner 2023-01-29 14:53:46 +11:00
71a0345768
style(menu): set min width w/ overflow-x: auto 2023-01-28 19:17:36 +11:00
38f59bab31
style(menu): add welcome banner 2023-01-28 18:34:26 +11:00
f943697ba7
fix(menu): preserve profile name on import, enabled repeat imports of same file 2023-01-24 09:23:09 +11:00
50a23f17c5
fix(menu): keyboard triggering of inputs and switches via space/enter, don't trap tab in hotkey input 2023-01-24 00:15:10 +11:00
c3317bd9ec
feat(menu): allow only one theme of each mode to be enabled at a time 2023-01-23 23:56:09 +11:00
7b6a244d72
feat(menu): display profile upload status as popup 2023-01-23 23:43:04 +11:00
e3f34dfc21
refactor(menu): menu.mjs render functions and components.mjs monolith -> islands/ and components/ 2023-01-23 21:58:17 +11:00
c19262a4ce
perf(load): import all deps at once + wait for load.mjs completion, fix(electron): use ipc for reloadApp 2023-01-20 00:33:05 +11:00
72332acc58
feat(menu): profile deletion via confirmation popup 2023-01-19 22:34:41 +11:00
23834475c0
feat(menu): hotswapped profiles w/out reload 2023-01-19 20:14:51 +11:00
106d776d85
feat(menu): render profile list, create and switch b/w profiles 2023-01-18 22:56:49 +11:00
7bafbedc67
feat(menu): add reload btn to footer, move return to category btn to footer 2023-01-16 19:29:53 +11:00
4456871f6d
feat(menu): loading skeleton 2023-01-16 16:47:27 +11:00
f57e5b7f9b
feat(menu): animate slide b/w mod lists <-> options, add enabled mods to sidebar 2023-01-16 13:34:41 +11:00
530be53e70
feat(menu): add searchbar + descriptions to mod lists, fix(menu): natural keyboard interactions w/ <Select> component 2023-01-15 22:54:57 +11:00
a8eb03ee67
refactor(menu): base input variants off dry <Input /> component 2023-01-15 17:48:21 +11:00
570a6f26ab
fix(menu): close select popups w/ esc, toggle menu w/ hotkeys while menu focused 2023-01-15 15:57:15 +11:00
e681d462d3
feat(menu): mimic notion select options popup
electron was positioning options distanced from their <select> for... some reason
2023-01-15 00:39:01 +11:00
d1f83884aa
chore(electron-compat): promisify db methods, import svgs as js instead of reading files 2023-01-14 22:17:28 +11:00
c95d96cd8e
feat(menu): option values update on view change/page focus, animate view changes 2023-01-14 21:38:51 +11:00
765e7b738c
chore(menu): ensure required mod.json fields exist before attempting render 2023-01-14 00:44:09 +11:00
c6d58f37ee
theme: classic dark, feat(menu): render card lists of available mods 2023-01-14 00:40:27 +11:00
d738801dc1
chore(menu): hide platform-specific options, hide empty/consecutive headings 2023-01-13 00:30:14 +11:00
d406f99d7e
feat(menu): show uploaded file name, clear prev uploads button 2023-01-13 00:05:32 +11:00
8d12d63349
feat(menu): save changes to options
file upload still todo
2023-01-12 23:19:06 +11:00
09268a538a
feat(menu): apply menuButtonIconStyle to icon in menu sidebar 2023-01-12 15:37:33 +11:00
8fe05b2888
feat(menu): text, number, hotkey & color input types
- replaced jscolor with coloris
2023-01-12 15:24:01 +11:00
f85b3c1359
feat(menu): clone notion file upload 2023-01-12 11:33:47 +11:00
b1e1405409
feat(menu): clone notion select/dropdown 2023-01-12 00:15:30 +11:00
5db238024a
chore(modloader): avoid repeat logging on menu load 2023-01-11 22:02:25 +11:00
881f69c47d
feat(menu): clone notion ui for core settings, add toggles
- reduce size of icons in sidebar
- keyboard focus outline
- improved distinguishing of attrs vs props
- register twind variants from preset-ext
2023-01-11 21:59:57 +11:00
ac5daf5b73
feat(menu): reactive view navigation 2023-01-11 17:29:57 +11:00
70cd128a46
feat(menu): notion-styled menu sidebar 2023-01-10 22:48:12 +11:00
bb7f044d3a
feat(theme): auto-load theme overrides or force to state 2023-01-09 22:38:16 +11:00
8c935ffb5d
fix(theme): consistent primary vs secondary bgs, mode-agnostic tooltip styling 2023-01-09 22:12:17 +11:00
523e1f0bb4
refactor(theme): pass style overrides and css variables through generator 2023-01-09 13:35:35 +11:00
0fbb85b138
chore: use utility classes for menu modal 2022-12-30 22:15:14 +11:00
b442e40446
feat: trigger menu from browser extension icon 2022-12-30 16:38:30 +11:00
c37877c6da
feat: load api/styles into menu, chore: separate mod types into folders 2022-12-30 15:19:47 +11:00
53362a4cee
feat: --theme--bg-overlay variable, style menu modal w/ variables 2022-12-28 00:41:24 +11:00
c1480c3840
fix: remove extra box-shadow from inline tables 2022-12-24 00:09:34 +11:00
2719751e2b
feat: theme css ~full coverage
- fonts
- interface bgs/borders
- dim bg variants for callouts and board groups
- manually-overriding code bg/fg
- datepicker
2022-12-23 23:57:25 +11:00
ee69d44796
feat: script generation of theme css
- foregrounds
- coloured backgrounds
- accents
- scrollbar
- inline code & code blocks

still todo:
- fonts
- base backgrounds
- borders and outlines
- tooltips
- cards
- buttons
- etc.
2022-12-23 00:26:40 +11:00
29c4fff909
feat: index/gen prism theming variables 2022-12-22 00:35:32 +11:00
5fb4405614
feat: create modal for menu to open within
- replace preact with direct htmlelement creation
2022-12-20 23:45:26 +11:00
40b150722e
feat: render lucide icons via twind 2022-12-20 02:14:31 +11:00
4965b28145
feat: update notion-enhancer icon 2022-12-17 18:10:08 +11:00
c7b384bc89
chore: add htm/preact to deps 2022-12-16 18:24:56 +11:00
a81a4dda6f
refactor: platform-agnostic modloading 2022-12-15 01:04:56 +11:00
d304f698a8
refactor: simplifications
- remove registry validation
- separate core from mods
- use __enhancerApi global for consistent api access
- use key-based namespacing instead of nested objects
2022-12-14 23:15:32 +11:00
44702af188
feat(desktop): use sqlite3 db
should fix the occasional db resets on concurrent read/write ops experienced with the json db
2022-12-13 13:34:24 +11:00
73e3c7c3a9
chore: update deps, add vendor script 2022-12-08 15:48:47 +11:00
Tom
c38c5006e0
merge git modules into monorepo 2022-12-07 20:05:37 +11:00
f8d647a1e6
chore: upload yarn.lock 2022-12-07 20:02:51 +11:00
dc0916ddda
chore: move extension manifest to src/, add build script 2022-12-07 19:56:31 +11:00
b1087a6187
feat(cli): port across apply & remove to updated cli 2022-12-07 19:04:21 +11:00
979616e032
feat(cli): safer patch process to avoid repeat-patching 2022-12-06 23:23:43 +11:00
ebf15dbfb9
feat(cli): ported remove cmd to new cli
+ more detailed error messages inc. alternative instructions for removal if not backup is found
2022-12-06 20:37:39 +11:00
a7861be39a
feat(cli): --quiet flag, split --dev into --json/--debug flags
+ added %PROGRAMW6432%/Notion/resources to potential resource paths (#779)
+ clearer separation of programmatic enhancement and cli interface
+ dep on vercel/arg for improved arg parsing
2022-12-06 15:37:21 +11:00
3e7b6dd6f8
chore: organise folders 2022-11-25 16:00:54 +11:00
92cc026904
rm submodule fetching workflow 2022-11-25 15:41:55 +11:00
7a065b1e69
rm .gitmodules 2022-11-25 15:40:17 +11:00
d704e08012
remove extension submodules 2022-11-25 15:38:49 +11:00
9c51542e50
Merge submodule contents for extension/dev 2022-11-25 15:37:32 +11:00
5c227381ea
Remove submodule extension 2022-11-25 15:36:51 +11:00
980e1c33aa
add extension submodule 2022-11-25 15:35:31 +11:00
89025f9fb6
Merge submodule contents for repo/dev 2022-11-25 15:22:40 +11:00
eaa4fb9d35
Remove submodule repo 2022-11-25 15:22:11 +11:00
016ed600b0
Merge submodule contents for dep/main 2022-11-25 15:22:06 +11:00
fd907a2ceb
Remove submodule dep 2022-11-25 15:21:46 +11:00
da30befa5c
Merge submodule contents for api/dev 2022-11-25 15:21:36 +11:00
22787bb44e
Remove submodule api 2022-11-25 15:21:15 +11:00
b574411edb
Merge submodule contents for media/main 2022-11-25 15:20:55 +11:00
1d43acf79e
Remove submodule media 2022-11-25 15:20:34 +11:00
31a2300913
mv submodules to root 2022-11-25 15:20:26 +11:00
dragonwocky
c1ba18b93e [repo] Merge pull request #100 from eldrickb/dev
Fix weekly-view for new Notion databases
2022-11-25 03:32:15 +00:00
dragonwocky
fd112e7b1a [repo] Merge pull request #100 from eldrickb/dev
Fix weekly-view for new Notion databases
2022-11-25 03:32:13 +00:00
Tom
d4a595a6ec Merge pull request #100 from eldrickb/dev
Fix weekly-view for new Notion databases
2022-11-25 14:31:48 +11:00
dragonwocky
3ca816fef5 [repo] Merge pull request #119 from DarkOnion0/dev
fix: make the notion-enhancer menu visible again
2022-11-25 03:31:29 +00:00
dragonwocky
0c5cc6321b [repo] Merge pull request #119 from DarkOnion0/dev
fix: make the notion-enhancer menu visible again
2022-11-25 03:31:20 +00:00
Tom
57b47b82aa Merge pull request #125 from amv146/bypass-preview-fix
Fixed bypass preview
2022-11-25 14:31:18 +11:00
Tom
7e9cd1b581 Merge pull request #119 from DarkOnion0/dev
fix: make the notion-enhancer menu visible again
2022-11-25 14:31:01 +11:00
Tom
e1ac1bfcd6
merge branches main and dev
merge branches main and dev
2022-11-25 14:29:47 +11:00
Tom
974f7ec63b
Merge pull request #763 from kidonng/patch-2
Add trailing semicolon when appending to preload script
2022-11-25 14:28:46 +11:00
Alex Vallone
2c89ced97e Fixed bypass preview 2022-09-01 21:45:06 -07:00
Alexo
70abec5630 fix: make the notion-enhancer menu visible again 2022-08-01 16:37:44 +00:00
Kid
f20e79cf3b
Add trailing semicolon when appending to preload script 2022-06-05 15:41:11 +08:00
pr3cast
fbc9709b66 Fix more code consistency in weekly-view 2022-03-21 15:18:25 -04:00
pr3cast
b921a2f86a Fix code consistentcy in weekly-view client 2022-03-21 15:06:40 -04:00
pr3cast
58d3030bf5 Clean up and comment new weekly-view client code 2022-03-21 14:52:01 -04:00
pr3cast
d884f146b3 Fix weekly-view view targeting for new Notion databases 2022-03-21 14:51:31 -04:00
dragonwocky
c806bfd5be [repo] tweaks: fix #32 wrap tables to page width 2022-03-10 11:54:21 +00:00
dragonwocky
5fd7daec9c [repo] tweaks: fix #32 wrap tables to page width 2022-03-10 11:54:21 +00:00
4e2253d0ac tweaks: fix #32 wrap tables to page width 2022-03-10 22:53:50 +11:00
dragonwocky
532e51abdd [repo] collapsible headers: deprecate in favour of toggle headers 2022-03-10 11:41:03 +00:00
dragonwocky
f7a708d8da [repo] collapsible headers: deprecate in favour of toggle headers 2022-03-10 11:41:02 +00:00
ec5af9735d collapsible headers: deprecate in favour of toggle headers 2022-03-10 22:40:34 +11:00
dragonwocky
854c15b61b [repo] indentation lines: fix #51, full support for toggle headers 2022-03-10 11:37:00 +00:00
dragonwocky
98ef8fa926 [repo] indentation lines: fix #51, full support for toggle headers 2022-03-10 11:36:59 +00:00
ad248ece6b indentation lines: fix #51, full support for toggle headers 2022-03-10 22:36:21 +11:00
dragonwocky
58b3b22274 [repo] Merge pull request #72 from amv146/dev
toggle header indentation lines, adjacent tab nav hotkeys
2022-03-10 10:56:33 +00:00
dragonwocky
db22ab5f0e [repo] Merge pull request #72 from amv146/dev
toggle header indentation lines, adjacent tab nav hotkeys
2022-03-10 10:56:30 +00:00
Tom
7358873fba Merge pull request #72 from amv146/dev
toggle header indentation lines, adjacent tab nav hotkeys
2022-03-10 21:56:12 +11:00
dragonwocky
d4dd19e1db [repo] fix #28: overlap b/w tabs and macos window buttons 2022-03-10 10:50:34 +00:00
dragonwocky
c607b1a705 [repo] fix #28: overlap b/w tabs and macos window buttons 2022-03-10 10:50:30 +00:00
7993f0f257 fix #28: overlap b/w tabs and macos window buttons 2022-03-10 21:50:03 +11:00
442d6d3427
fix #684: normalise target paths on windows 2022-03-10 21:30:46 +11:00
amv146
300f876a28 Added Ctrl-Tab and Ctrl-Shift-Tab functionality 2022-02-08 20:06:32 -08:00
amv146
6c1e6ffbce toggle header support added 2022-02-08 17:52:34 -08:00
dragonwocky
8d317c9381 [repo] pr #47 by @blorbb: colour fixes
light gray tags missing - #42

gruvbox dark tag colours not applying - #35
list and timeline tag colours not applying - #35

also added: apply theme variables to the palette of colours when selecting a tag/background colour
2022-01-21 01:20:36 +00:00
dragonwocky
a2a5649327 [repo] pr #47 by @blorbb: colour fixes
light gray tags missing - #42

gruvbox dark tag colours not applying - #35
list and timeline tag colours not applying - #35

also added: apply theme variables to the palette of colours when selecting a tag/background colour
2022-01-21 01:20:33 +00:00
Tom
b93f730170 pr #47 by @blorbb: colour fixes
light gray tags missing - #42

gruvbox dark tag colours not applying - #35
list and timeline tag colours not applying - #35

also added: apply theme variables to the palette of colours when selecting a tag/background colour
2022-01-21 12:20:13 +11:00
blorbb
43bcc8101c add tag_default back 2022-01-21 12:04:10 +11:00
waaaaaaaaaaaaaaaaaaaaa
48fa479001 add light_gray colours 2022-01-06 11:55:08 +11:00
waaaaaaaaaaaaaaaaaaaaa
6d598bf6e3 Merge branch 'dev' of https://github.com/blorbb/repo into dev 2022-01-06 10:25:32 +11:00
waaaaaaaaaaaaaaaaaaaaa
ed743d2f65 fix tag colours not applying in list and timeline 2022-01-06 10:21:40 +11:00
waaaaaaaaaaaaaaaaaaaaa
ce500c7f8e fix tag colours not applying in list and timeline views 2022-01-05 23:08:32 +11:00
waaaaaaaaaaaaaaaaaaaaa
d8999da4a6 Merge branch 'dev' of https://github.com/blorbb/repo into dev 2022-01-05 18:59:36 +11:00
waaaaaaaaaaaaaaaaaaaaa
91986905c8 update to light_gray 2022-01-05 18:59:31 +11:00
waaaaaaaaaaaaaaaaaaaaa
69ca30a105 update to light_gray 2022-01-05 14:52:18 +11:00
waaaaaaaaaaaaaaaaaaaaa
195c0917ff rename to light_gray 2022-01-05 11:24:50 +11:00
waaaaaaaaaaaaaaaaaaaaa
6178c59951 add custom colours to tag and highlight previews 2022-01-04 15:09:47 +11:00
waaaaaaaaaaaaaaaaaaaaa
eb7e840ad8 add light gray, testing 2022-01-04 12:38:15 +11:00
dragonwocky
fe41861a5e [repo] Merge pull request #26 from EliWimmer/patch-1
Fixed grouped DB headings not receiving bg color
2022-01-01 01:14:15 +00:00
dragonwocky
8e9442336d [repo] Merge pull request #26 from EliWimmer/patch-1
Fixed grouped DB headings not receiving bg color
2022-01-01 01:14:14 +00:00
Tom
0fe314420c Merge pull request #26 from EliWimmer/patch-1
Fixed grouped DB headings not receiving bg color
2022-01-01 12:13:57 +11:00
Eli
6f4774391b Fixed grouped DB headings not receiving bg color
Thoroughly tested every DB view and group type and the style z-index: 84 does appear to be exclusive to this element.
2021-12-31 18:01:59 -07:00
4f222a3b73
npm publish 2021-12-31 23:43:04 +11:00
5b8f37f226 v0.11.0 2021-12-31 20:47:46 +11:00
2ec3d6db1c readme: website -> browser 2021-12-31 20:47:34 +11:00
f417de519a
v0.11.0 2021-12-31 20:39:01 +11:00
dragonwocky
832db26d2e [media] upload chrome webstore promo imgs 2021-12-29 07:14:50 +00:00
dragonwocky
3eb704cb5c [media] upload chrome webstore promo imgs 2021-12-29 07:14:49 +00:00
74e21aa4be upload chrome webstore promo imgs 2021-12-29 18:14:17 +11:00
dragonwocky
a4584c2a19 [repo] theming: remove block on left of table head 2021-12-29 04:40:56 +00:00
dragonwocky
bef2ec8106 [repo] theming: remove block on left of table head 2021-12-29 04:40:49 +00:00
c8163ef2bd theming: remove block on left of table head 2021-12-29 15:40:23 +11:00
dragonwocky
d66446285b [repo] adjust menu input icon position 2021-12-29 04:26:02 +00:00
dragonwocky
57f2337d51 [repo] adjust menu input icon position 2021-12-29 04:25:57 +00:00
33aaf8b50d adjust menu input icon position 2021-12-29 15:25:30 +11:00
825020bdae remove unnecessary host permissions 2021-12-28 23:00:13 +11:00
6fc767b5a2 remove unnecessary async in worker 2021-12-28 22:44:59 +11:00
1acaac2484 update README with link to new website 2021-12-28 16:28:34 +11:00
207757644a
update README with link to new website 2021-12-28 16:25:30 +11:00
dragonwocky
2fd4b30319 [repo] change donation link, update README with link to new website 2021-12-28 05:24:09 +00:00
dragonwocky
ee6c1f5ee2 [repo] change donation link, update README with link to new website 2021-12-28 05:24:09 +00:00
38b2bcc47b change donation link, update README with link to new website 2021-12-28 16:23:46 +11:00
dragonwocky
00702dffbd [api] update README with link to new website 2021-12-28 05:23:29 +00:00
dragonwocky
6dec43e649 [api] update README with link to new website 2021-12-28 05:23:26 +00:00
dragonwocky
68c8a71c76 [dep] update README with link to new website 2021-12-28 05:23:20 +00:00
01abef3e30 update README with link to new website 2021-12-28 16:23:19 +11:00
dragonwocky
6282377416 [dep] update README with link to new website 2021-12-28 05:23:19 +00:00
0c337cae3d update README with link to new website 2021-12-28 16:22:52 +11:00
21d5660ec3 update README with link to new website 2021-12-28 16:21:29 +11:00
4f0204aee3
make --patch available, remove cli sign 2021-12-28 02:31:44 +11:00
7e4febd730 board view + code caption + calendar select colour patches 2021-12-28 02:29:56 +11:00
dragonwocky
94f1d9bf84 [repo] update welcome message 2021-12-27 08:00:13 +00:00
a000e73847 update welcome message 2021-12-27 18:57:08 +11:00
3f5ff3642d env jsdoc changes 2021-12-24 23:36:46 +11:00
e84967ae6c
env jsdoc changes 2021-12-24 23:30:55 +11:00
dragonwocky
eb8673c484 [repo] icons/tweaks page links, remove unnecessary async, update profiles explanation 2021-12-24 12:30:24 +00:00
dragonwocky
88acc12530 [repo] icons/tweaks page links, remove unnecessary async, update profiles explanation 2021-12-24 12:30:21 +00:00
10a1ba4099 icons/tweaks page links, remove unnecessary async, update profiles explanation 2021-12-24 23:29:59 +11:00
dragonwocky
170a1e3eda [api] minor cleanups, jsdoc changes 2021-12-24 12:29:02 +00:00
dragonwocky
0ff214bce5 [api] minor cleanups, jsdoc changes 2021-12-24 12:28:55 +00:00
0052fa4cdd minor cleanups, jsdoc changes 2021-12-24 23:28:33 +11:00
dragonwocky
8fa498ef95 [api] var -> const 2021-12-20 01:14:30 +00:00
dragonwocky
6f2018bcd1 [api] var -> const 2021-12-20 01:14:29 +00:00
081e59bb78 var -> const 2021-12-20 12:14:03 +11:00
dragonwocky
d3ad47d152 [dep] remove prism.js 2021-12-20 01:07:05 +00:00
dragonwocky
d425c7b228 [dep] remove prism.js 2021-12-20 01:07:00 +00:00
0f912ebef8 remove prism.js 2021-12-20 12:06:34 +11:00
34189f6a41
mark bin.mjs as executable 2021-12-14 21:13:13 +11:00
dragonwocky
7eb7f1be12 [repo] detect tab icons when sidebar closed, weekly view support expanded cal rows 2021-12-14 10:12:17 +00:00
dragonwocky
0a7a45baf3 [repo] detect tab icons when sidebar closed, weekly view support expanded cal rows 2021-12-14 10:12:14 +00:00
2724f3d859 detect tab icons when sidebar closed, weekly view support expanded cal rows 2021-12-14 21:11:47 +11:00
e900bdb681
reduce multi-process file op interference 2021-12-14 11:58:21 +11:00
50a77d05a1
electron fs: use notion:// for api reqs instead of http:// 2021-12-13 18:40:26 +11:00
dragonwocky
5ea1e70813 [api] electron fs: use notion:// for api reqs instead of http:// 2021-12-13 07:40:12 +00:00
dragonwocky
a44ae9f4f1 [api] electron fs: use notion:// for api reqs instead of http:// 2021-12-13 07:40:10 +00:00
caa0117318 electron fs: use notion:// for api reqs instead of http:// 2021-12-13 18:39:41 +11:00
dragonwocky
068199dbaf [repo] [imgbot] optimize screenshots 2021-12-13 07:14:07 +00:00
dragonwocky
df2719ed71 [repo] [imgbot] optimize screenshots 2021-12-13 07:14:03 +00:00
Tom
3753126c26 [imgbot] optimize screenshots 2021-12-13 18:13:45 +11:00
ImgBotApp
e5ac4e204f [ImgBot] Optimize images
*Total -- 154.67kb -> 118.21kb (23.57%)

/integrated-titlebar/integrated-titlebar.jpg -- 19.25kb -> 8.38kb (56.46%)
/truncated-titles/truncated-titles.jpg -- 10.88kb -> 5.63kb (48.2%)
/always-on-top/always-on-top.jpg -- 8.18kb -> 4.74kb (42.03%)
/tray/tray.jpg -- 12.59kb -> 8.88kb (29.44%)
/view-scale/view-scale.jpg -- 7.05kb -> 5.29kb (25.03%)
/tabs/tabs.jpg -- 27.36kb -> 23.54kb (13.95%)
/collapsible-properties/collapsible-properties.jpg -- 69.36kb -> 61.75kb (10.98%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2021-12-13 07:13:02 +00:00
dragonwocky
5e15e8cfa5 [repo] desktop-only ext. screenshots + fix custom icons in tab 2021-12-13 07:02:47 +00:00
dragonwocky
670ea3f178 [repo] desktop-only ext. screenshots + fix custom icons in tab 2021-12-13 07:02:43 +00:00
179dbabd5a desktop-only ext. screenshots + fix custom icons in tab 2021-12-13 18:02:17 +11:00
Tom
1a03c08b36
merge v0.11.0 rework into dev 2021-12-13 14:24:08 +11:00
b1351069b9
delete everything: prep for merge 2021-12-13 14:23:33 +11:00
b8647deede
sign cli cmd (macos), bugfix error printing, fs dep on __enhancerElectronApi, actually apply systemMenu patch 2021-12-13 13:36:06 +11:00
dragonwocky
f0e8bff9ec [api] make fs ops depend on __enhancerElectronApi for relative paths
(update bundled index.cjs)
2021-12-13 02:35:09 +00:00
2775fab5d4 make fs ops depend on __enhancerElectronApi for relative paths
(update bundled index.cjs)
2021-12-13 13:34:39 +11:00
dragonwocky
33856dea20 [repo] tabs: remember last open 2021-12-12 12:56:38 +00:00
dd463ee9d8 tabs: remember last open 2021-12-12 23:56:09 +11:00
3af07ca21a
notion window helpers, pull submodules 2021-12-12 23:13:17 +11:00
dragonwocky
2a8ab5c51e [api] strict hotkey modifiers + electron window helpers 2021-12-12 12:13:05 +00:00
2428a42103 strict hotkey modifiers + electron window helpers 2021-12-12 23:12:38 +11:00
dragonwocky
a925981b16 [repo] prevent attempts to open notion urls in menu window 2021-12-12 12:12:08 +00:00
01dc6d4bb7 prevent attempts to open notion urls in menu window 2021-12-12 23:11:41 +11:00
dragonwocky
d0a0b90274 [repo] tabs: restore prev. hotkey 2021-12-12 11:24:48 +00:00
ab300633ec tabs: restore prev. hotkey 2021-12-12 22:24:13 +11:00
dragonwocky
bc73baa86a [repo] theme tag colours in selection input 2021-12-12 06:18:24 +00:00
af977b1bfa theme tag colours in selection input 2021-12-12 17:17:59 +11:00
dragonwocky
b2c46d7fbe [repo] tabs: intercept ctrl+click & 'open in desktop app'
create a new tab instead of a new window
2021-12-12 06:10:42 +00:00
fc4cd900cf tabs: intercept ctrl+click & 'open in desktop app'
create a new tab instead of a new window
2021-12-12 17:10:11 +11:00
57c4d63275
handle proper loading of frame.mjs & frame.css 2021-12-12 13:33:38 +11:00
dragonwocky
041980aca4 [repo] focus mode + tabs integration 2021-12-12 02:33:30 +00:00
01ae8d67a2 focus mode + tabs integration 2021-12-12 13:32:59 +11:00
e4943d9abb
patch systemMenu: mod window menu template 2021-12-11 18:04:03 +11:00
dragonwocky
0169506c49 [api] tooltip text-align: auto -> start 2021-12-11 07:03:29 +00:00
8cc057a5f8 tooltip text-align: auto -> start 2021-12-11 18:03:05 +11:00
dragonwocky
7cd96cbc7b [repo] tab hotkeys: close, open, select + better drag indicator 2021-12-11 07:02:51 +00:00
2ffc6e1e12 tab hotkeys: close, open, select + better drag indicator 2021-12-11 18:02:22 +11:00
dragonwocky
961b79ad12 [api] make tooltip text alignment match relative pos 2021-12-11 03:20:42 +00:00
4fcb467351 make tooltip text alignment match relative pos 2021-12-11 14:20:14 +11:00
dragonwocky
f6ff48f072 [repo] tab layout & label styles 2021-12-11 03:20:04 +00:00
3e07f23128 tab layout & label styles 2021-12-11 14:19:08 +11:00
9bf68ca679
attempt to reduce fs conflicts (storage)
needs more work... interference b/w processes corrupting file and resetting storage?
2021-12-10 23:40:05 +11:00
dragonwocky
a4c29b4056 [api] remove hasFocus checks: not all events were being responded to 2021-12-10 12:39:17 +00:00
e4187700b2 remove hasFocus checks: not all events were being responded to 2021-12-10 23:38:47 +11:00
dragonwocky
2feb7b9e0a [repo] tabs: inter-window drag, titles & icons 2021-12-10 12:37:28 +00:00
cb7838350f tabs: inter-window drag, titles & icons 2021-12-10 23:36:56 +11:00
dragonwocky
13d9b484c9 [api] perf: only observe if window/document/tab is focused 2021-12-10 03:41:58 +00:00
d984c8bc36 perf: only observe if window/document/tab is focused 2021-12-10 14:41:29 +11:00
dragonwocky
7f5815bb92 [repo] draggable & slide-in/out tabs 2021-12-10 03:41:20 +00:00
2dcfef0b6b draggable & slide-in/out tabs 2021-12-10 14:40:47 +11:00
3e927e75b8
imitate notion ipc channels, pull submodules 2021-12-10 00:06:09 +11:00
dragonwocky
f0a5f83255 [repo] basic tabs: open/close/navigate between, integrated titlebar btns 2021-12-09 13:05:54 +00:00
58b44d556e basic tabs: open/close/navigate between, integrated titlebar btns 2021-12-10 00:05:28 +11:00
dragonwocky
74b0ae9f65 [api] optionally imitate notion ipc channels 2021-12-09 13:05:09 +00:00
9b47ede63e optionally imitate notion ipc channels 2021-12-10 00:04:36 +11:00
dragonwocky
09a86e074c [repo] stricter theme application, ipc broadcasting 2021-12-09 10:15:24 +00:00
eaf9c001dd stricter theme application, ipc broadcasting 2021-12-09 21:14:49 +11:00
e1190fe3f8
fs.notionPath, pull submodules 2021-12-08 22:42:03 +11:00
dragonwocky
d334b6490d [repo] tabs progress: recreate default webview + search 2021-12-08 11:41:47 +00:00
e071940a0d tabs progress: recreate default webview + search 2021-12-08 22:41:17 +11:00
dragonwocky
53589378b2 [api] fs.notionPath, minify index.cjs 2021-12-08 11:40:43 +00:00
21d4991f38 fs.notionPath, minify index.cjs 2021-12-08 22:40:09 +11:00
1f0a738610
esbuild mjs api -> cjs, simplify env folder to dep. fully on __enhancerElectronApi 2021-12-07 23:18:25 +11:00
dragonwocky
9a574bee3a [repo] ctrl+click open in new window, style ctrl+f popup 2021-12-07 12:18:06 +00:00
c32b41021b ctrl+click open in new window, style ctrl+f popup 2021-12-07 23:17:19 +11:00
dragonwocky
6c3e2b941a [api] use esbuild to compile .mjs to .cjs 2021-12-07 11:13:17 +00:00
b770eb64f0 use esbuild to compile .mjs to .cjs 2021-12-07 22:12:46 +11:00
3b787c1aa4
menu: handle external links, force open new windows 2021-12-05 17:54:29 +11:00
dragonwocky
e466ceff7a [repo] added tooltips to topbar mods, centered/tightened menu nav 2021-12-05 06:54:02 +00:00
16f1510779 added tooltips to topbar mods, centered/tightened menu nav 2021-12-05 17:53:39 +11:00
dragonwocky
2a4083c511 [api] overhauled tooltips: directional positioning, wrapping to max lines 2021-12-05 06:53:20 +00:00
24bc8bda66 overhauled tooltips: directional positioning, wrapping to max lines 2021-12-05 17:52:50 +11:00
dragonwocky
75311ddc98 [repo] prevent topbar collapse, api.electron, treat menu as hideable window 2021-12-05 02:39:28 +00:00
d5a38c80ea prevent topbar collapse, api.electron, treat menu as hideable window 2021-12-05 13:38:58 +11:00
2732d00825
allow menu to run in background via the tray mod 2021-12-04 23:24:21 +11:00
dragonwocky
761ae8f394 [api] add api.electron to access __enhancerElectronApi 2021-12-04 06:36:35 +00:00
7abbb779f5 add api.electron to access __enhancerElectronApi 2021-12-04 17:36:08 +11:00
dragonwocky
1bd52d42db [repo] make view scale desktop-only (browsers have zoom builtin already) 2021-12-04 02:14:10 +00:00
ec91fb6bf0 make view scale desktop-only (browsers have zoom builtin already) 2021-12-04 13:13:42 +11:00
d3b4461b49
update changelog, add webFrame to electronApi 2021-12-04 13:11:17 +11:00
dragonwocky
32b9732139 [repo] extension: view scale by @SP12893678 2021-12-04 02:11:12 +00:00
SP12893678
e79de360f1
extension: view-scale (#532)
* add a mod that can use to scale the notion view

* fix bugs and add hotkey & mouse wheel options

* add select_modifier option and add resize event to fix bugs

* add silder ui to scale view
2021-12-04 13:10:54 +11:00
2ec9808e34 extension: view scale by @SP12893678 2021-12-04 13:10:41 +11:00
dragonwocky
8d8fe96c68 [repo] desktop-only extension: always on top (inc. customisable icons) 2021-12-03 03:12:04 +00:00
eca85f7a7d desktop-only extension: always on top (inc. customisable icons) 2021-12-03 14:11:35 +11:00
a9a6c33436
expose isMenuOpen from worker 2021-12-03 00:56:51 +11:00
97ef140789 tray: open on startup, handle notion:// protocol 2021-12-03 00:55:49 +11:00
dragonwocky
8f936c3d7d [repo] tray: hotkey, run in background
window management features patched to reduce unexpected behaviour e.g. duplicate windows
2021-12-02 13:01:32 +00:00
e761b309bf tray: hotkey, run in background
window management features patched to reduce unexpected behaviour e.g. duplicate windows
2021-12-03 00:00:16 +11:00
Solirpa
895334c640
fix open duplicate notion windows when click dock notion icon on macos bigsur (#487) 2021-12-02 18:53:08 +11:00
da70a3ed4f
allow modification of parent file globals via __eval 2021-12-02 17:59:44 +11:00
dragonwocky
6625c9a328 [repo] desktop-only extension: integrated titlebar (inc. customisable icons) 2021-12-02 06:58:48 +00:00
7f53445ab0 desktop-only extension: integrated titlebar (inc. customisable icons) 2021-12-02 17:58:24 +11:00
dragonwocky
40c0b8acb3 [api] fix cjs internal reference to registry.get 2021-12-02 06:58:04 +00:00
39f66c5bb8 fix cjs internal reference to registry.get 2021-12-02 17:57:37 +11:00
dragonwocky
0eb13f3eac [repo] use .reverse()[0] instead of .at(-1): not supported in older app env 2021-11-30 12:04:31 +00:00
022613d66b use .reverse()[0] instead of .at(-1): not supported in older app env 2021-11-30 23:04:02 +11:00
507731cefa
pull refactors/fixes from other repos, push license 2021-11-30 22:57:44 +11:00
dragonwocky
801d79542b [repo] icon sets: encode imgs to data url to prevent quality reduction 2021-11-30 11:47:10 +00:00
8f8dafeb70 icon sets: encode imgs to data url to prevent quality reduction 2021-11-30 22:46:41 +11:00
dragonwocky
6d6ac532eb [repo] outliner: more reliable page detection 2021-11-30 10:19:50 +00:00
da85adcd33 outliner: more reliable page detection 2021-11-30 21:19:22 +11:00
dragonwocky
fb00c09cbe [api] push mit license, corner action color vars 2021-11-30 09:44:33 +00:00
461533fa07 push mit license, corner action color vars 2021-11-30 20:44:04 +11:00
dragonwocky
7ecf07fd0c [repo] patch notion theme changes
bar at top of db, cards, db groups, simple tables, calendar tags, calendar selection, code captions, corner actions, etc.
2021-11-30 09:43:55 +00:00
7bdae2faa6 patch notion theme changes
bar at top of db, cards, db groups, simple tables, calendar tags, calendar selection, code captions, corner actions, etc.
2021-11-30 20:43:20 +11:00
dragonwocky
0f0e234ae7 [repo] collapsible properties: remove 'hide/show' from button title 2021-11-30 07:14:49 +00:00
a90c5fe946 collapsible properties: remove 'hide/show' from button title 2021-11-30 18:14:23 +11:00
dragonwocky
0429da10a4 [api] update component stylesheet paths 2021-11-30 07:14:04 +00:00
8afc70da95 update component stylesheet paths 2021-11-30 18:13:39 +11:00
80a4b66128 _.mjs -> index.mjs, fix storage callback doc 2021-11-30 18:12:04 +11:00
dragonwocky
19c2da54c3 [repo] update imports for api folder structure 2021-11-30 07:01:45 +00:00
6874b905eb update imports for api folder structure 2021-11-30 18:01:15 +11:00
dragonwocky
a0c54a3ea3 [api] cleanup folder structure, fix storage callback doc 2021-11-30 07:00:24 +00:00
b6b997ca23 cleanup folder structure, fix storage callback doc 2021-11-30 17:59:48 +11:00
dragonwocky
390613f1e7 [repo] misc fixes (see desc)
themes: remove mono text hue rotate
word-counter/outliner: update properly on focus
collapsible headers: dont error if addedNodes is text node
theming: style quick search, force help button opaque
2021-11-08 11:20:57 +00:00
6ee8086b51 misc fixes (see desc)
themes: remove mono text hue rotate
word-counter/outliner: update properly on focus
collapsible headers: dont error if addedNodes is text node
theming: style quick search, force help button opaque
2021-11-08 22:20:30 +11:00
dragonwocky
cc34222e6f [api] remove conflict with corner buttons 2021-11-08 11:16:01 +00:00
6008623812 remove conflict with corner buttons 2021-11-08 22:15:35 +11:00
3f57f01f55
fix env fs, electron js init, handle search/hash in scheme 2021-11-07 23:40:44 +11:00
dragonwocky
bd94a6bb93 [api] require() just before use 2021-11-07 11:57:54 +00:00
5cab38d07c require() just before use 2021-11-07 22:57:21 +11:00
616686b3c8 move changelog 2021-11-07 18:57:22 +11:00
4df4235ad2
create menu window 2021-11-07 18:54:08 +11:00
dragonwocky
1337c3619c [repo] scope all await statements 2021-11-07 07:53:50 +00:00
a72441ee86 scope all await statements 2021-11-07 18:53:18 +11:00
dragonwocky
6be658b41f [api] env.notionRequire 2021-11-07 07:49:08 +00:00
bf3948f9c5 env.notionRequire 2021-11-07 18:48:38 +11:00
d8cec4368d
patch scheme, init client, cjs api, env storage
hidden --dev-patch apply opt
2021-11-07 16:10:42 +11:00
dragonwocky
21f588a289 [api] port to cjs 2021-11-07 05:08:51 +00:00
0aabc67774 port to cjs 2021-11-07 16:08:22 +11:00
dragonwocky
0ab9cb127f [dep] add mime db (stream protocol intercept) 2021-11-06 06:49:41 +00:00
ba6008efd7 add mime db (stream protocol intercept) 2021-11-06 17:49:10 +11:00
dragonwocky
aedad789c6 [media] link to notion-enhancer/desktop repo 2021-11-06 05:11:06 +00:00
781686f78b link to notion-enhancer/desktop repo 2021-11-06 16:10:53 +11:00
dragonwocky
099723d469 [repo] link to notion-enhancer/desktop repo 2021-11-06 05:10:52 +00:00
302408f265 link to notion-enhancer/desktop repo 2021-11-06 16:10:43 +11:00
496305597a link to notion-enhancer/desktop repo 2021-11-06 16:10:25 +11:00
dragonwocky
83ae3a0e4c [api] link to notion-enhancer/desktop repo 2021-11-06 05:10:21 +00:00
671266fff0 link to notion-enhancer/desktop repo 2021-11-06 16:07:39 +11:00
da2be9d7c9
link submodules 2021-11-06 15:59:15 +11:00
affa314f08
new cli 2021-11-06 14:26:35 +11:00
8306472bbd rename launcher to init 2021-11-06 11:13:31 +11:00
dragonwocky
599d15bbff [repo] update menu colour var mapping 2021-11-06 00:08:17 +00:00
b91ce6f56c update menu colour var mapping 2021-11-06 11:07:45 +11:00
Jason Antwi-Appah
b1b1a1b725
Add support for user-only Notion installs on macOS (#375)
* feat(macOS): add support for user-only Notion installs

* feat(macOS): add support for user-only Notion installs

* fixing an accidental change
2021-11-03 22:14:53 +11:00
dragonwocky
5a796ab68d [repo] corner button cross-theme readability 2021-11-03 10:53:27 +00:00
e3b598dc00 corner button cross-theme readability 2021-11-03 21:53:21 +11:00
f1705d97fb corner button cross-theme readability 2021-11-03 21:52:59 +11:00
dragonwocky
1a6ffa8b4e [repo] update themes to match new colour variables 2021-11-02 11:19:59 +00:00
a4119cd3b9 update themes to match new colour variables 2021-11-02 22:19:25 +11:00
dragonwocky
a6663ceea8 [repo] light board colors 2021-11-02 09:22:23 +00:00
cd0a4d1ba3 light board colors 2021-11-02 20:21:55 +11:00
dragonwocky
8d1fb6ec56 [repo] map updated notion colours to theming system 2021-11-02 06:40:52 +00:00
e06b320ae6 map updated notion colours to theming system 2021-11-02 17:40:26 +11:00
dragonwocky
79bae0116c [repo] optimise preview imgs 2021-11-01 23:46:07 +00:00
Tom
177c16bce6 optimise preview imgs 2021-11-02 10:45:30 +11:00
dragonwocky
d8806fa15e [repo] Merge pull request #1 from notion-enhancer/imgbot
[ImgBot] Optimize images
2021-11-01 23:44:07 +00:00
ImgBotApp
9c4f24d4fa [ImgBot] Optimize images
*Total -- 2,184.53kb -> 1,463.27kb (33.02%)

/code-line-numbers/code-line-numbers.png -- 19.24kb -> 5.80kb (69.86%)
/indentation-lines/indentation-lines.jpg -- 11.01kb -> 3.50kb (68.19%)
/outliner/outliner.png -- 56.84kb -> 23.91kb (57.93%)
/quick-note/quick-note.png -- 6.14kb -> 3.16kb (48.47%)
/scroll-to-top/scroll-to-top.png -- 7.39kb -> 4.23kb (42.81%)
/word-counter/word-counter.jpg -- 96.53kb -> 58.77kb (39.12%)
/nord/nord.png -- 128.75kb -> 80.83kb (37.22%)
/pinky-boom/pinky-boom.png -- 127.48kb -> 80.19kb (37.1%)
/gruvbox-light/gruvbox-light.png -- 128.38kb -> 80.83kb (37.04%)
/light+/light+.png -- 128.08kb -> 80.97kb (36.78%)
/dracula/dracula.png -- 130.01kb -> 82.51kb (36.54%)
/playful-purple/playful-purple.png -- 129.07kb -> 82.17kb (36.34%)
/cherry-cola/cherry-cola.png -- 128.49kb -> 82.03kb (36.16%)
/material-ocean/material-ocean.png -- 129.12kb -> 82.61kb (36.02%)
/gruvbox-dark/gruvbox-dark.png -- 128.07kb -> 82.22kb (35.8%)
/neutral/neutral.png -- 122.60kb -> 79.65kb (35.03%)
/pastel-dark/pastel-dark.png -- 125.10kb -> 81.53kb (34.83%)
/dark+/dark+.png -- 125.41kb -> 81.94kb (34.66%)
/right-to-left/right-to-left.jpg -- 19.99kb -> 13.47kb (32.61%)
/calendar-scroll/calendar-scroll.png -- 19.31kb -> 14.18kb (26.58%)
/topbar-icons/topbar-icons.jpg -- 2.19kb -> 1.70kb (22.42%)
/weekly-view/weekly-view.jpg -- 24.93kb -> 19.67kb (21.11%)
/simpler-databases/simpler-databases.jpg -- 36.85kb -> 30.15kb (18.2%)
/collapsible-headers/collapsible-headers.gif -- 145.67kb -> 122.05kb (16.21%)
/truncated-titles/truncated-titles.jpg -- 12.41kb -> 10.88kb (12.34%)
/icon-sets/icon-sets.jpg -- 36.42kb -> 31.95kb (12.28%)
/emoji-sets/emoji-sets.jpg -- 79.34kb -> 70.98kb (10.53%)
/collapsible-properties/collapsible-properties.jpg -- 70.71kb -> 63.32kb (10.45%)
/global-block-links/global-block-links.jpg -- 9.01kb -> 8.09kb (10.21%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2021-11-01 12:22:26 +00:00
dragonwocky
7e5c1b1575 [repo] extension + integration screenshots 2021-11-01 11:58:38 +00:00
f5f81547bf extension + integration screenshots 2021-11-01 22:58:09 +11:00
dragonwocky
c4c2ce7165 [repo] tweak welcome text and add modal to notif badge count 2021-10-31 09:46:31 +00:00
bdba993cf8 tweak welcome text and add modal to notif badge count 2021-10-31 20:46:07 +11:00
b8966c8459 reformat changelog under headers 2021-10-31 18:37:50 +11:00
dragonwocky
b6efd3301e [repo] added welcome/changelog/license acceptance modal 2021-10-31 07:36:34 +00:00
1ac78b64e8 added welcome/changelog/license acceptance modal 2021-10-31 18:36:01 +11:00
dragonwocky
521e9d1148 [api] removed welcome notification from registry 2021-10-31 07:25:30 +00:00
76df1e7676 removed welcome notification from registry 2021-10-31 18:25:01 +11:00
dragonwocky
782082ceba [repo] integration: quick note 2021-10-31 01:22:01 +00:00
9b1a1ea509 integration: quick note 2021-10-31 12:21:39 +11:00
dragonwocky
9876e195f9 [api] handle space and plus in hotkeys 2021-10-31 01:21:33 +00:00
21c56590a5 handle space and plus in hotkeys 2021-10-31 12:21:02 +11:00
Ryo Hilmawan
0a64c4eb5c
update cloudhill mods (#600) 2021-10-30 23:06:10 +11:00
a678716120 changelog: icon sets, collapse headers, simpler dbs, img alignment 2021-10-30 22:37:36 +11:00
dragonwocky
8566d0b5ed [repo] extension: icon sets part 2 (enhancer + custom sets, sprites & spinners) 2021-10-30 11:32:15 +00:00
805cbb836d extension: icon sets part 2 (enhancer + custom sets, sprites & spinners) 2021-10-30 22:31:49 +11:00
dragonwocky
d2127207f3 [repo] extension: icon sets part 1 (save/reuse recent uploads) 2021-10-30 08:14:48 +00:00
96988d67e0 extension: icon sets part 1 (save/reuse recent uploads) 2021-10-30 19:14:22 +11:00
dragonwocky
1c203f56d7 [api] notion api upload file, registry integration tag 2021-10-30 08:14:00 +00:00
a497618ea4 notion api upload file, registry integration tag 2021-10-30 19:13:27 +11:00
dragonwocky
c9f63e27ab [repo] menu: sidebar responds to changes in history, restores on reload 2021-10-29 01:22:50 +00:00
6a84fbec91 menu: sidebar responds to changes in history, restores on reload 2021-10-29 12:22:24 +11:00
dragonwocky
ae6f5b86dd [repo] tweak: image alignment (center/left/right) 2021-10-24 02:31:01 +00:00
4d8eec7399 tweak: image alignment (center/left/right) 2021-10-24 13:30:21 +11:00
dragonwocky
2329bc5520 [api] add keydown & in-input hotkey opts 2021-10-23 12:13:06 +00:00
10a58ca18d add keydown & in-input hotkey opts 2021-10-23 23:12:30 +11:00
dragonwocky
8dd4872f05 [repo] extension: simpler databases 2021-10-23 12:12:29 +00:00
047b4cce7d extension: simpler databases 2021-10-23 23:11:52 +11:00
dragonwocky
6996ab84d6 [repo] extension: collapsible headers 2021-10-21 12:28:28 +00:00
38484b7e42 extension: collapsible headers 2021-10-21 23:27:58 +11:00
e72115fd51 update panel, hotkey comment 2021-10-21 23:27:19 +11:00
790ddcbac2 Merge branch 'dev' of github.com:notion-enhancer/extension into dev 2021-10-20 23:05:05 +11:00
dragonwocky
fc418bc838 [repo] extension: global block links 2021-10-20 12:04:57 +00:00
1f47f1be34 update changelog, clipboard read perm 2021-10-20 23:04:55 +11:00
dbb94bc29b extension: global block links 2021-10-20 23:04:26 +11:00
dragonwocky
9517395f44 [api] clipboard helpers 2021-10-20 12:02:54 +00:00
7da5f65c85 clipboard helpers 2021-10-20 23:02:26 +11:00
dragonwocky
70b302a912 [api] smoother tooltips, delay arg 2021-10-20 10:03:48 +00:00
db5ec9a934 smoother tooltips, delay arg 2021-10-20 21:03:20 +11:00
dragonwocky
82564420e4 [repo] extension: truncated titles 2021-10-20 10:02:27 +00:00
b1ced4fac8 extension: truncated titles 2021-10-20 21:01:52 +11:00
b294964b26 extension: code line numbers 2021-10-20 15:42:22 +11:00
dragonwocky
1ecfd102ba [repo] extension: weekly view 2021-10-19 12:43:18 +00:00
6d40349389 extension: weekly view 2021-10-19 23:42:48 +11:00
41e1258469 update changelog 2021-10-19 21:29:41 +11:00
dragonwocky
921f89ec4b [api] adjust url regex 2021-10-19 10:28:27 +00:00
690b677dc9 adjust url regex 2021-10-19 21:28:01 +11:00
dragonwocky
1146e9eaa9 [repo] extension: right-to-left 2021-10-19 10:26:38 +00:00
8a1eb811a6 extension: right-to-left 2021-10-19 21:26:05 +11:00
dragonwocky
642f9accbb [repo] extension: outliner 2021-10-19 05:41:15 +00:00
382451156c extension: outliner 2021-10-19 16:40:50 +11:00
dragonwocky
8e97cf1030 [api] focus/blur listeners on side panel 2021-10-19 05:39:15 +00:00
fe42600ab8 focus/blur listeners on side panel 2021-10-19 16:38:48 +11:00
dragonwocky
04a1e4938c [repo] observe topbar icons for in previews 2021-10-18 12:54:10 +00:00
a9427f4520 observe topbar icons for in previews 2021-10-18 23:53:42 +11:00
dragonwocky
67cc36c35a [repo] extension: topbar icons 2021-10-18 12:28:02 +00:00
d25d4f2f13 extension: topbar icons 2021-10-18 23:27:27 +11:00
Alejandro Romano
3e7319464e
Fix persistent high CPU usage when emoji-sets is enabled (#586)
MutationObserver enters into an infinite loop by iterating on itself. By disconnecting the observer and reconnecting it after parsing the DOM for emoji-sets to work, we stop the problem and Notion goes back to sane 0% CPU idle usage.
2021-10-18 22:19:34 +11:00
dragonwocky
18ee0d9ea9 [repo] emoji-sets: fix native emoji alignment 2021-10-18 11:16:22 +00:00
b8fdad91c3 emoji-sets: fix native emoji alignment 2021-10-18 22:15:27 +11:00
Alejandro Romano
0198e29f46
Fix margins for every emoji set (#585)
Custom emojis, when displayed as icons in every page and in the left sidebar of Notion, are a bit misaligned. This is not the case for the emojis in the page content. Just specific places when they act like icons. They are a few pixels off but it triggers an OCD in me 🤣

This fixes it and it looks awesome. Precisely aligned as the default emoji set.
2021-10-18 22:05:35 +11:00
dragonwocky
e09443a048 [repo] extension: emoji sets 2021-10-18 09:35:15 +00:00
a824ba8856 extension: emoji sets 2021-10-18 20:34:48 +11:00
dragonwocky
2dfb3bb539 [api] observe child changes better 2021-10-18 09:34:16 +00:00
860a943437 observe child changes better 2021-10-18 20:33:45 +11:00
Hayk Aprikyan
63bf82507f
restore messenger emojis (#362)
* added messenger set

* added messenger value
2021-10-18 18:01:04 +11:00
110d2f3551 Merge branch 'dev' of github.com:notion-enhancer/extension into dev 2021-10-18 17:29:34 +11:00
7048abaedd update changelog, add clipboardwrite perm to manifest 2021-10-18 17:29:18 +11:00
dragonwocky
9bc748d67c [repo] extension: word counter (moved to panel) 2021-10-18 06:28:54 +00:00
1f9537b755 extension: word counter (moved to panel) 2021-10-18 17:28:28 +11:00
dragonwocky
00090853b9 [api] panel: work without right-sidebar pre-existing
+ smaller tweaks inc. icon pos, default uuid gen, clickthrough hover area to topbar
2021-10-18 06:28:24 +00:00
85dbb33fab panel: work without right-sidebar pre-existing
+ smaller tweaks inc. icon pos, default uuid gen, clickthrough hover area to topbar
2021-10-18 17:27:53 +11:00
dragonwocky
0bc838113e [repo] restore theme patches to perma-applied 2021-10-17 12:12:22 +00:00
d5c45a8771 restore theme patches to perma-applied 2021-10-17 23:11:58 +11:00
dragonwocky
9641a35a06 [repo] extension: focus mode
+ only inject theming css if a theme is enabled, to reduce lag
2021-10-17 11:58:12 +00:00
9b3cf23b08 extension: focus mode
+ only inject theming css if a theme is enabled, to reduce lag
2021-10-17 22:57:41 +11:00
dragonwocky
9ca4e51fab [repo] rainbow indentation lines + block dragger bg fix 2021-10-17 11:18:13 +00:00
69c3034a8b rainbow indentation lines + block dragger bg fix 2021-10-17 22:17:33 +11:00
dragonwocky
c77cf71163 [repo] extension: indentation lines
+ new feature: toc support
2021-10-15 12:21:58 +00:00
f9b95ef848 extension: indentation lines
+ new feature: toc support
2021-10-15 23:21:26 +11:00
Tom
54319a8bf2
Update README.md 2021-10-14 08:42:16 +11:00
Jordan Robinson
e990c51c00
Adds gruvbox-dark theme based on morhetz gruvbox vim theme (#382) 2021-10-13 14:21:44 +11:00
50f8683ec8 update changelog: font chooser, property layout, scroll to top 2021-10-13 14:08:04 +11:00
dragonwocky
fd0a635ae7 [api] component: corner action 2021-10-13 03:05:47 +00:00
a03168d980 component: corner action 2021-10-13 14:05:22 +11:00
dragonwocky
883f7915c7 [repo] extension: scroll to top 2021-10-13 03:05:14 +00:00
1fda0e9c86 extension: scroll to top 2021-10-13 14:04:40 +11:00
dragonwocky
6a5c6e2a73 [repo] extension: collapse properties
formerly property-layout, added per-page memory
2021-10-13 00:20:15 +00:00
1e5c985e76 extension: collapse properties
formerly property-layout, added per-page memory
2021-10-13 11:19:38 +11:00
dragonwocky
d99983105f [repo] incomplete theme colour mapping update
https://discord.com/channels/748161877045149706/748162220424167534/897602187067269130 more changes to come
2021-10-12 23:16:04 +00:00
3b4030d12b incomplete theme colour mapping update
https://discord.com/channels/748161877045149706/748162220424167534/897602187067269130 more changes to come
2021-10-13 10:07:06 +11:00
dragonwocky
84ae933d4a [api] allow empty strings as option values 2021-10-12 07:39:29 +00:00
cc1418ee5d allow empty strings as option values 2021-10-12 18:39:04 +11:00
dragonwocky
ecac94a8b3 [repo] extension: font chooser 2021-10-12 07:39:03 +00:00
ef05403caf extension: font chooser 2021-10-12 18:38:23 +11:00
9d0994e225 update changelog: tweaks + themes 2021-10-10 16:36:31 +11:00
dragonwocky
b9b8c5fa67 [repo] tweak: full width pages + table wrap bugfixes
+ neutral theme font size fix + menu focused mod b/w tab switching fix
2021-10-10 05:33:32 +00:00
7f266f207b tweak: full width pages + table wrap bugfixes
+ neutral theme font size fix + menu focused mod b/w tab switching fix
2021-10-10 16:33:06 +11:00
dragonwocky
f372f0d361 [repo] tweak: accented links 2021-10-10 04:19:30 +00:00
1af8878748 tweak: accented links 2021-10-10 15:19:03 +11:00
dragonwocky
f718410970 [repo] tweak: responsive columns breakpoint (%) 2021-10-10 03:21:46 +00:00
4fa312c19b tweak: responsive columns breakpoint (%) 2021-10-10 14:21:18 +11:00
dragonwocky
445714df01 [repo] upload theme previews 2021-10-10 02:03:54 +00:00
6aacd075fb upload theme previews 2021-10-10 13:03:21 +11:00
dragonwocky
3986fc5670 [repo] light+ configurable highlight color for text/lines etc. 2021-10-10 01:30:39 +00:00
81c0e13523 light+ configurable highlight color for text/lines etc. 2021-10-10 12:30:06 +11:00
dragonwocky
4ac45ea2d2 [api] adjust rgb contrast constant 2021-10-10 01:28:12 +00:00
5f52f520f4 adjust rgb contrast constant 2021-10-10 12:27:42 +11:00
dragonwocky
83d4518d27 [repo] load js in menu, configurable accents in dark+/light+ 2021-10-09 14:28:50 +00:00
02c085e832 load js in menu, configurable accents in dark+/light+ 2021-10-10 01:28:24 +11:00
dragonwocky
661f5ee341 [api] shade/contrast rgb helpers 2021-10-09 14:00:33 +00:00
824da94ffb shade/contrast rgb helpers 2021-10-10 00:59:55 +11:00
dragonwocky
1dbaf2967d [api] prevent double-reading of registry, allow menu/frame scripts 2021-10-09 13:01:29 +00:00
9b4b21c297 prevent double-reading of registry, allow menu/frame scripts 2021-10-10 00:00:59 +11:00
dragonwocky
de5e7e846e [repo] themes: light+, pinky boom, playful purple
+ quotation marks tweak extracted from prev. littlepig
2021-10-09 07:17:25 +00:00
bb42117024 themes: light+, pinky boom, playful purple
+ quotation marks tweak extracted from prev. littlepig
2021-10-09 18:16:56 +11:00
dragonwocky
2376d33e19 [repo] remove csp-blocked fonts from themes 2021-10-08 06:03:55 +00:00
809df67a14 remove csp-blocked fonts from themes 2021-10-08 17:03:12 +11:00
dragonwocky
9017edd1cd [repo] theme: gruvbox light (sepia) 2021-10-08 05:53:47 +00:00
60a7b57ccc theme: gruvbox light (sepia) 2021-10-08 16:53:16 +11:00
dragonwocky
9da41805f6 [api] include commit msg in submodule update 2021-10-08 04:46:12 +00:00
579050e349 include commit msg in submodule update 2021-10-08 15:45:48 +11:00
dragonwocky
a962b0044e [dep] include commit msg in submodule update 2021-10-08 04:45:30 +00:00
c43dec218b include commit msg in submodule update 2021-10-08 15:45:08 +11:00
dragonwocky
cd18658d55 [media] include commit msg in submodule update 2021-10-08 04:44:49 +00:00
a4d4e4e007 include commit msg in submodule update 2021-10-08 15:44:21 +11:00
dragonwocky
ad217c0b6b repo submodule: include commit msg in submodule update 2021-10-08 04:42:26 +00:00
e15370bede include commit msg in submodule update 2021-10-08 15:42:01 +11:00
dragonwocky
07a408f477 update submodule: api 2021-10-08 04:32:11 +00:00
e78d6c2965 rename bg_popup to bg_card for side panel 2021-10-08 15:31:42 +11:00
dragonwocky
4345ff172f update submodule: repo 2021-10-08 04:26:14 +00:00
c569d4190a theme: gruvbox dark 2021-10-08 15:25:47 +11:00
dragonwocky
d14b53acd5 update submodule: repo 2021-10-08 02:31:14 +00:00
daa8489175 theme: nord 2021-10-08 13:30:43 +11:00
a8ed96e09b remove id from path to menu 2021-10-08 12:31:18 +11:00
dragonwocky
c83003cfac update submodule: repo 2021-10-08 01:29:12 +00:00
c4e6b6b62a theme: neutral
remove ids from mod folder names
2021-10-08 12:28:44 +11:00
dragonwocky
c9dd292f68 update submodule: repo 2021-10-07 12:07:39 +00:00
1f88c043dc make author email optional 2021-10-07 23:07:09 +11:00
86721aabba theme: pastel dark 2021-10-07 23:06:11 +11:00
dragonwocky
574e5100cd update submodule: repo 2021-10-07 11:36:53 +00:00
7aa3f04f8b theme: dracula
improve tweaks table width normalisation
2021-10-07 22:36:20 +11:00
dragonwocky
dc3c78d134 update submodule: repo 2021-10-06 12:03:16 +00:00
7418e33d1e theme embed + template blocks 2021-10-06 23:02:42 +11:00
3a781bb94c apply on onboarding page 2021-10-06 21:57:28 +11:00
dragonwocky
9e0b089e07 update submodule: repo 2021-10-06 10:56:36 +00:00
17c51e7110 theme: dark+ 2021-10-06 21:56:07 +11:00
dragonwocky
d3a9e968ba update submodule: repo 2021-10-06 09:37:49 +00:00
6f4ca93d14 enhance onboarding pages 2021-10-06 20:37:09 +11:00
dragonwocky
f4bf94a0c8 update submodule: repo 2021-10-06 07:00:22 +00:00
2df027e888 theme: cherry cola 2021-10-06 17:58:21 +11:00
dragonwocky
801ce4ec91 update submodule: repo 2021-10-06 06:55:54 +00:00
dragonwocky
8d369bbef2 update submodule: repo 2021-10-06 06:06:49 +00:00
c894758f1a theme: material-ocean + related bugfixes 2021-10-06 17:06:10 +11:00
f7a888e590 more robust storage path handling 2021-10-05 00:09:39 +11:00
dragonwocky
7b2761460e update submodule: api 2021-10-04 13:05:11 +00:00
a5ecd02068 improved tooltip styling 2021-10-05 00:04:43 +11:00
dragonwocky
c8ed9d3769 update submodule: repo 2021-10-04 13:04:13 +00:00
b463b2b7e7 tweaks: update, add table wrapping & hide '/' for commands
+ other bugfixes
2021-10-05 00:03:40 +11:00
dragonwocky
a394c25d3d update submodule: repo 2021-10-04 11:45:18 +00:00
f2928371b6 update + port: bypass-preview, calendar-scroll 2021-10-04 22:44:51 +11:00
ea0992a9d8 more reliable launcher check 2021-10-04 22:10:41 +11:00
dragonwocky
e035f385ca update submodule: api 2021-10-04 07:40:24 +00:00
ae400099eb attempt #2: notion unofficial api wrapper
(capable of getting, searching, creating and editing all content)
2021-10-04 18:39:56 +11:00
dragonwocky
79039d0661 update submodule: api 2021-10-04 07:35:52 +00:00
fd2b729228 fix typos, rename notion.add to notion.create 2021-10-04 18:35:22 +11:00
dragonwocky
f49be7a01f update submodule: api 2021-10-04 07:32:38 +00:00
9bb779149b add unofficial notion api wrapper (capable of getting, searching, creating and editing all content) 2021-10-04 18:32:03 +11:00
dragonwocky
5f169ddf01 update submodule: repo 2021-10-03 12:55:41 +00:00
022c08fe75 remove font_heading and font_quote variables
interfered with page sans/serif/mono setting: https://github.com/notion-enhancer/notion-repackaged/issues/44
2021-10-03 23:55:14 +11:00
dragonwocky
270cf0e82c update submodule: api 2021-10-03 12:08:05 +00:00
a86b363ea2 workflow: add loop 2021-10-03 23:07:42 +11:00
dragonwocky
00595ce5bf update submodule: dep 2021-10-03 12:07:35 +00:00
7a5a954aa7 workflow: fix branch, add loop 2021-10-03 23:07:15 +11:00
dragonwocky
c52a849049 update submodule: repo 2021-10-03 12:06:59 +00:00
f9147991e8 workflow: add loop 2021-10-03 23:06:38 +11:00
dragonwocky
d98e1ccfe0 update submodule: media 2021-10-03 12:06:31 +00:00
74ea0e4bbf workflow: fix branch, add loop 2021-10-03 23:06:09 +11:00
dragonwocky
b9bf75d541 update submodule: media 2021-10-03 12:05:28 +00:00
dragonwocky
dd85d86052 update submodule: api 2021-10-03 12:00:14 +00:00
19fbe73949 workflow: update parent repo 2021-10-03 23:00:13 +11:00
539fcc6f2e workflow: update parent repo 2021-10-03 23:00:00 +11:00
cce4788aba workflow: update parent repo 2021-10-03 22:59:48 +11:00
dragonwocky
ecb702ae2c update submodule: repo 2021-10-03 11:43:21 +00:00
c36dc27637 use name env var in workflow 2021-10-03 22:42:56 +11:00
dragonwocky
6a820424ea update submodule: repo 2021-10-03 11:35:10 +00:00
2902e33d11 update parent workflow 2021-10-03 22:34:46 +11:00
e9e0c2b557 add update submodules workflow 2021-10-03 21:32:31 +11:00
Tom
7dcafa12f6 typo in readme 2021-10-03 21:04:21 +11:00
3f81a32351 move dep to submodule 2021-10-03 21:02:22 +11:00
039baf6ea7 upload latest 2021-10-03 21:01:43 +11:00
Tom
59489df994 Initial commit 2021-10-03 21:00:40 +11:00
c80ee2635f move icon to media submodule 2021-10-03 20:48:42 +11:00
44f8693490 move icon/ to media/ 2021-10-03 20:47:03 +11:00
a432a2d612 upload icons 2021-10-03 20:43:40 +11:00
Tom
3192050de8 Initial commit 2021-10-03 20:42:46 +11:00
bb8220c66c move repo to submodule 2021-10-03 19:48:26 +11:00
d4b344900f upload progress of ported mods from extension repo 2021-10-03 19:47:11 +11:00
8159fc2256 move api to submodule 2021-10-03 19:31:54 +11:00
cdf8537153 upload progress from extension repo 2021-10-03 19:29:18 +11:00
Tom
d1fc35c608 Initial commit 2021-10-03 19:23:00 +11:00
9dcbfc213f menu: store theme outside profile, reload env on profile change 2021-10-03 15:08:42 +11:00
42cfc69357 cleanup panel: fade long titles, remember last open, bugfixes 2021-10-03 13:50:19 +11:00
6656b639d7 side panel switcher 2021-10-03 03:13:10 +11:00
bc38f5d972 side panel component: working except switcher 2021-10-03 00:13:50 +10:00
33e8907d4f replace hook with pseudo-mod, env folder = simpler documentation 2021-10-02 12:31:07 +10:00
a7549cd9db api hooks - enabling core mods to extend the api
moved tooltips to one, preparing to set up sidebar
2021-10-02 00:12:30 +10:00
8d377e1ac2 split up mega-validation registry function 2021-10-01 20:54:56 +10:00
ac12b164da refactor api ready for submodule 2021-10-01 17:39:45 +10:00
abbfce9af1 profile json exports/imports 2021-10-01 16:06:23 +10:00
95621cd029 downgrade to manifest v2 for firefox support (tested/working) 2021-10-01 00:23:26 +10:00
ccbcdaf76a force one theme per mode, move notif cache outside of profile, cleanup test data 2021-09-30 23:46:24 +10:00
775d8412d0 added profile switcher + split up menu js 2021-09-30 23:09:22 +10:00
ea53f672ee options in menu sidebar + new hotkey input 2021-09-30 20:59:32 +10:00
8c1b5c0835 refactor twind to classes + support notion.site + bugfixes 2021-09-29 21:04:49 +10:00
ea30d01296 menu breakpoints + reload notif + profile db in registry api 2021-09-29 11:55:03 +10:00
7734e3977e searchable categorised mod lists + bypass-preview extension update 2021-09-28 23:22:49 +10:00
f7c597ebb3 menu routing/structure + nav 2021-09-28 12:59:56 +10:00
a2b93cb513 init menu with twind + notifications 2021-09-28 00:11:47 +10:00
b900c00641 bugfix storage, theming, validation, update launcher 2021-09-27 19:01:21 +10:00
5bb8b5f3fc improved registry validation + methods, prep for profiles 2021-09-27 16:32:27 +10:00
f383e6b401 split up + improve api part 1: all except registry, temp disabled launcher 2021-09-27 02:24:36 +10:00
f98dcb174a update dependencies + manifest + icons 2021-09-26 16:39:19 +10:00
6eff0289f4 bugfix relation input styling, restore light theme 2021-09-26 12:36:17 +10:00
bafc714b59 theming system theoretically light/dark consistent, full coverage (needs more testing) 2021-09-26 00:28:10 +10:00
d857209b19 theming system rework progress 2021-09-24 23:52:52 +10:00
Jaime Martínez Rincón
8393aa325b
Update README for notion-repackaged (#523) 2021-07-04 22:09:39 +10:00
Jaime Martínez Rincón
b248ffa3ba
Update README to reference notion-app-enhanced (#500)
* Update README to reference notion-app-enhanced

* temp remove incompatible notion-app from list

Co-authored-by: Tom <thedragonring.bod@gmail.com>
2021-05-30 00:43:53 +10:00
46879fe47a calendar-scroll + temp disable of broken theming 2021-05-16 22:58:17 +10:00
99c166a1ac add new colour picker option 2021-05-13 10:59:08 +10:00
6f3c1691c4 add fontawesome. all of it. its too much.
extra can be deleted when dev finished.
2021-05-11 23:34:17 +10:00
a55482d62d add menu filters + unspaghetti menu code 2021-05-11 23:29:12 +10:00
4e3f921ee3 bypass-preview 2021-05-05 23:35:26 +10:00
f6d8f222a6 clear file picker button 2021-05-05 21:25:47 +10:00
cb4aad5ba0 removed js insert, css insert moved to tweaks mod 2021-05-04 23:43:09 +10:00
28bb0663d4 jsdoc namespaces 2021-05-04 23:13:03 +10:00
2671410fe9 helpers -> api, jsdoc comment them 2021-05-03 23:44:15 +10:00
af7e659c0e merge bracketed-links with tweaks 2021-05-03 21:39:16 +10:00
86723e28eb changelogs, css insert, tweaks 2021-05-03 12:02:18 +10:00
ecfb3c1e50 error notifications + theme conflict resolution 2021-04-29 14:20:27 +10:00
69b73f6140 toggle hotkey option + tab reload on changes 2021-04-28 22:43:19 +10:00
62ba127793 add mod enabling/disabling 2021-04-27 22:06:45 +10:00
16ab3a4969 tooltips ✔ 2021-04-27 20:21:34 +10:00
1d9785f804 tooltips wip 2021-04-26 15:12:24 +10:00
15b34ef638 save options in menu 2021-04-25 23:29:01 +10:00
8d0ce2e777 notification receiving system complete 2021-04-24 10:50:46 +10:00
042ddfed13 mockup alerts, add header icons, copy plaintext code button 2021-04-23 12:33:57 +10:00
0bc27b9a57 prism.js theme created/matched to notion (documentation styling complete) 2021-04-23 01:00:06 +10:00
8454f86024 more reliable menu tab focusing + shortcut/icon -> notion 2021-04-21 23:52:35 +10:00
9a0ffdd9bc add ids to markdown headings 2021-04-21 21:24:31 +10:00
f3c384e25d refactoring + move storage to helpers for compatibility 2021-04-21 20:17:19 +10:00
d58d5b1850 syntax higlighting ✔ (needs proper theming) 2021-04-21 11:51:21 +10:00
93e764fb0a sync menu & notion themes, mod page routing, better component gen 2021-04-21 00:07:49 +10:00
d2292137da move svg icons into own files, add dep to manifest 2021-04-20 17:19:26 +10:00
a5c4d47a6d add mod pages to menu: options & docs (README.md rendered) 2021-04-20 00:16:46 +10:00
5fe31ac703 bugfix tab management for menu, transfer to mod folder, start menu mockup 2021-04-18 02:32:56 +10:00
05760882b5 transfer validation to at runtime for better module dev + add buttons to open the menu 2021-04-17 02:29:53 +10:00
68ae14d967 basic script loading system
// to investigate: will the module approach break things when porting back to desktop
2021-04-12 00:19:24 +10:00
f1dcc694de basic theming system + module validator tool 2021-04-11 23:54:28 +10:00
Tom
5b516c21c6 Initial commit 2021-04-11 23:45:05 +10:00
Torch
b417882eec
Add link to fix 2021-04-10 11:12:27 -04:00
David Bailey
df92f22b0b
Update links + install info for notion-linux (#412) 2021-02-07 09:25:46 +11:00
a362f804d9
new theming: missing styles + bugfixes 2020-12-18 22:44:38 +11:00
5aa36fef41
upload wip rework: installer + themer 2020-12-16 10:29:21 +11:00
95bf160ba9 remove core mods 2020-12-15 23:49:49 +11:00
35d9c915b1
rename folders prepping to move to new repos 2020-12-15 21:57:07 +11:00
311e435e2e rename folders prepping to move to new repos 2020-12-15 21:57:07 +11:00
CloudHill
21552ee041 topbar icons: more specific selectors
+ fixes compatibility with global links mod
2020-12-14 20:57:26 +07:00
CloudHill
b79a40777d topbar icons: more specific selectors
+ fixes compatibility with global links mod
2020-12-14 20:57:26 +07:00
CloudHill
c21fe3e2f1 simpler databases: fix initialization of store variables 2020-12-14 20:42:39 +07:00
CloudHill
e724fe7aef simpler databases: fix initialization of store variables 2020-12-14 20:42:39 +07:00
Emir
458089a953
pinky boom theme: make the title lowercase (#350) 2020-12-14 10:11:20 +11:00
Emir
1b773a580a pinky boom theme: make the title lowercase (#350) 2020-12-14 10:11:20 +11:00
Emir
7e87b6f5c7
global linking blocks: bug fix and new option (#347)
* global linking blocks: fix wrong appending

* global linking blocks: option: show the page link button

* global linking blocks: color changes, new icon, new button text
2020-12-14 04:58:52 +11:00
Emir
ae12bb81a7 global linking blocks: bug fix and new option (#347)
* global linking blocks: fix wrong appending

* global linking blocks: option: show the page link button

* global linking blocks: color changes, new icon, new button text
2020-12-14 04:58:52 +11:00
Ryo Hilmawan
652e67d6c7
new extension: simpler databases (#349) 2020-12-14 04:25:19 +11:00
Ryo Hilmawan
a6bea11d93 new extension: simpler databases (#349) 2020-12-14 04:25:19 +11:00
mugiwarafx
e12b3bac85
feat(theme): add pinky boom light theme (#348)
* feat(theme): add pinky boom theme

* fix: folder theme path

* fix: proper var syntax

* feat(theme): add pinky boom theme

* feat(theme): add pinky boom light theme

* add newline mod.js

* add newline variables.css
2020-12-14 04:18:13 +11:00
mugiwarafx
f97ab060ce feat(theme): add pinky boom light theme (#348)
* feat(theme): add pinky boom theme

* fix: folder theme path

* fix: proper var syntax

* feat(theme): add pinky boom theme

* feat(theme): add pinky boom light theme

* add newline mod.js

* add newline variables.css
2020-12-14 04:18:13 +11:00
CloudHill
2b18b2ef68 notion-icons: add search bar (notion-enhancer/icons#4)
+ overall optimizations
2020-12-13 23:52:44 +07:00
CloudHill
00014e402c notion-icons: add search bar (notion-enhancer/icons#4)
+ overall optimizations
2020-12-13 23:52:44 +07:00
Emir
2245f8ccdd
extension: global linking blocks (#345) 2020-12-13 09:03:38 +11:00
Emir
6caffa14ae extension: global linking blocks (#345) 2020-12-13 09:03:38 +11:00
CloudHill
c4b4d31aa2 code-line-numbers: horizontal scroll bugfix
added background so that numbers no longer appear over the code
2020-12-11 17:15:35 +07:00
CloudHill
1478d44828 code-line-numbers: horizontal scroll bugfix
added background so that numbers no longer appear over the code
2020-12-11 17:15:35 +07:00
CloudHill
3f48fa42ab outliner optimizations, making use of fragments 2020-12-11 16:59:15 +07:00
CloudHill
80d1694977 outliner optimizations, making use of fragments 2020-12-11 16:59:15 +07:00
Ryo Hilmawan
31c43fdded
update dracula theme variables (#341) 2020-12-10 23:00:04 +11:00
Ryo Hilmawan
74641c8d6c update dracula theme variables (#341) 2020-12-10 23:00:04 +11:00
CloudHill
4b7c26f5b3 fix scroll-db_toolbars tweak's selectors
stops unrelated elements from being selected
2020-12-10 18:15:25 +07:00
CloudHill
7b91dbcd85 fix scroll-db_toolbars tweak's selectors
stops unrelated elements from being selected
2020-12-10 18:15:25 +07:00
Ryo Hilmawan
943f58630e
theming bugfixes and additional variables (#309)
* theming bugfixes and additional variables

* add theming code variables for constant and regex
2020-12-10 15:57:35 +11:00
Ryo Hilmawan
4211bd6189 theming bugfixes and additional variables (#309)
* theming bugfixes and additional variables

* add theming code variables for constant and regex
2020-12-10 15:57:35 +11:00
Tom
a17de1e768
revert accidental merge of still-wip "tweak: hide empty sidebar arrow"
This reverts commit 5305c0b9b0.
2020-12-10 15:56:39 +11:00
Tom
81216b8a90 revert accidental merge of still-wip "tweak: hide empty sidebar arrow"
This reverts commit 5305c0b9b0.
2020-12-10 15:56:39 +11:00
Emir
5305c0b9b0
tweak: hide empty sidebar arrow (#319) 2020-12-10 15:55:04 +11:00
Emir
5f69306429 tweak: hide empty sidebar arrow (#319) 2020-12-10 15:55:04 +11:00
MANNEN
b48efb2f39
Add files via upload (#335) 2020-12-09 11:18:20 +11:00
MANNEN
64ba7c79a1 Add files via upload (#335) 2020-12-09 11:18:20 +11:00
CloudHill
2d43b79735 outliner: refactor to increase performance
reduced the number of times the outliner has to refresh
in response to issue #333
2020-12-09 01:34:59 +07:00
CloudHill
bb9a0e197d outliner: refactor to increase performance
reduced the number of times the outliner has to refresh
in response to issue #333
2020-12-09 01:34:59 +07:00
CloudHill
07d0836e97 side-panel: detect keyboard events to navigate the panel switcher
(tab, arrows, enter, space, escape)
2020-12-08 00:24:01 +07:00
CloudHill
b0430b4541 side-panel: detect keyboard events to navigate the panel switcher
(tab, arrows, enter, space, escape)
2020-12-08 00:24:01 +07:00
CloudHill
6a8006823f outliner fix inline page links not rendering right 2020-12-07 16:52:14 +07:00
CloudHill
134fd074c2 outliner fix inline page links not rendering right 2020-12-07 16:52:14 +07:00
CloudHill
67b396e511 outliner now follows the headers' inline styling 2020-12-07 16:26:40 +07:00
CloudHill
88bbff62fe outliner now follows the headers' inline styling 2020-12-07 16:26:40 +07:00
Emir
927ba69695
remove tag, change avatar source, make curly braces consistent (#327) 2020-12-06 22:43:33 +11:00
Emir
6fe02a710c remove tag, change avatar source, make curly braces consistent (#327) 2020-12-06 22:43:33 +11:00
Emir
ca605ec049
add font variables for headings, headings input for font chooser and fix quote variable (#322)
* add font variables for headings, headings input for font chooser and fix quote variable

* fix spaces for consistent code

* fix version number (semver)

* bring together all heading styles

* bring together all heading variables

* update font styling loop
2020-12-06 12:54:25 +11:00
Emir
e68f3c7b79 add font variables for headings, headings input for font chooser and fix quote variable (#322)
* add font variables for headings, headings input for font chooser and fix quote variable

* fix spaces for consistent code

* fix version number (semver)

* bring together all heading styles

* bring together all heading variables

* update font styling loop
2020-12-06 12:54:25 +11:00
Emir
4eb63f751f
fix the sizing of avatars in enhancer menu (#324) 2020-12-06 12:54:10 +11:00
Emir
24cb16c0e6 fix the sizing of avatars in enhancer menu (#324) 2020-12-06 12:54:10 +11:00
Ryo Hilmawan
1c3b8e5fa4
new extension: collapsible headers (#320) 2020-12-06 05:13:01 +11:00
Ryo Hilmawan
38dded687e new extension: collapsible headers (#320) 2020-12-06 05:13:01 +11:00
6f4534c9fc
link back to main notion-deb-builder 2020-12-05 13:07:26 +11:00
caa2360a3d replace feature requests with feature proposals + prep changelog for v0.10.2 2020-12-05 12:37:02 +11:00
Ryo Hilmawan
406e6fa5d9 new extension: panel-sites (#313) 2020-12-05 10:19:34 +11:00
Emir
0476cd316f option: hide 'page details' text for word counter (#315)
* option: hide 'page details' text for word counter

* fix version number (semver)

* set camel case to snake case
2020-12-05 09:07:47 +11:00
Emir
74d95498ac add quote variable for themes and quote input for font chooser (#314)
* add quote variable for themes and quote input for font chooser

* fix version number (semver)
2020-12-05 09:06:40 +11:00
CloudHill
23c477232f fix 'littlepig-dark' typo (was 'littilepig-dark') 2020-12-04 14:24:31 +07:00
CloudHill
ba8a044e4f pass store() into panel mods' js file in the same way as other extensions 2020-12-04 14:19:20 +07:00
be40723e1c refactor __notion back to a function for error handling, replace missing executables with backups in check 2020-12-04 15:02:28 +11:00
CloudHill
894f2578df fix outliner lines not scrolling with the container 2020-12-04 10:54:26 +07:00
CloudHill
7d61ca130b prevent the outliner's styles from being overriden 2020-12-03 22:17:51 +07:00
70dd43bad4 #306 file explorer no longer opens when enhancer menu is opened 2020-12-03 23:27:45 +11:00
CloudHill
b598aa451e fix side panel mod being stuck outside the screen 2020-12-03 19:00:36 +07:00
f85f3b19e5 fix tabs for electron/notion update 2020-12-03 21:43:45 +11:00
f77f5040a4 add potential duplicates workflow
+ declare window variable with let as per https://github.com/notion-enhancer/notion-enhancer/issues/298#issuecomment-737749264
2020-12-03 20:40:49 +11:00
CloudHill
c410b14c19 minor style changes to code-line-numbers, outliner, side-panel 2020-12-03 16:31:24 +07:00
Kirakeru
23f823d6ef Fix White Window Bug #298 (#302) 2020-12-03 09:22:12 +11:00
CloudHill
5f096034c1 side-panel: bind toggling to Ctrl+Shift+Backslash 2020-12-02 22:33:20 +07:00
CloudHill
416a343809 side-panel: styling for reload button 2020-12-02 22:29:16 +07:00
CloudHill
03139a5e7c outliner: add option to show indentation lines 2020-12-02 22:10:05 +07:00
Ryo Hilmawan
b5bdeb108b move indentation lines from tweaks to its own mod (#287)
* move indentation lines from tweaks to its own mod

* changed indentation lines author to runargs

* refactor indentation lines to use the map function
2020-12-02 23:10:35 +11:00
Emir
c352cc9438 extension: truncated table titles (#292) 2020-12-02 23:09:31 +11:00
Ryo Hilmawan
c08f7cdb86 New extensions: side panel and outliner (#284)
* upload side panel core

* upload outliner extension

* add onLoad, onSwitch, and onResize functions to panel extensions

* Update panel.js

* Add onLock and onUnlock functions to panel extensions

* Reordered side panel content loading

* change panel switcher font color

* fix loading last opened panel

* use svg icon files instead of defining them inline

* outliner: add full height option
2020-12-02 23:05:33 +11:00
Ryo Hilmawan
44fe96a56f Modify the enhancer menu's toggle styles to follow notion's toggles (#283)
* notion-enhancer#261 modify toggle styles to look similiar to notion's toggle

* remove `dot` spans from toggles
2020-12-02 23:05:14 +11:00
Ryo Hilmawan
353a538585 notion-icons: fix toggle icon shrinking 2020-11-24 18:39:37 +07:00
CloudHill
9deb75361a notion-icons: toggleable community icon packs 2020-11-24 13:53:06 +07:00
Ryo Hilmawan
c86e2f7548 remove console logging 2020-11-21 22:38:25 +07:00
Ryo Hilmawan
aa46310b3a fix description capitalization 2020-11-21 22:37:50 +07:00
Ryo Hilmawan
cd9283dcd0 Fix visual issues and modal detection (#279) 2020-11-21 17:18:21 +11:00
Ryo Hilmawan
2fbe7a3798 Update mod.js (#276) 2020-11-19 22:44:51 +11:00
Ryo Hilmawan
9b644b3f86 Fix code line wrapping + other improvements (#275) 2020-11-19 20:00:15 +11:00
Ryo Hilmawan
3c5fd94c2e Notion-icons: better popup modal detection (#274)
* Update mod.js

* Fix modal detection on preview pages
2020-11-19 15:03:00 +11:00
Ryo Hilmawan
57bdccf7dc Update mod.js (#270) 2020-11-19 07:09:17 +11:00
ecc74244c4 prep changelog for pre/bugfix release, replace links 2020-11-18 23:08:59 +11:00
Emir
66b97450d4 add auto-shrink system for tabs (#262)
* add auto-shrink system for tabs

* decrease tab limit and minimum width of non-current tabs
2020-11-16 11:32:32 +11:00
Ryo Hilmawan
a53f5ad652 Patch Notion Icons Extension (#257)
* Remove console logging in mod.js

* Rename styles.css to app.css
2020-11-15 12:08:03 +11:00
Ryo Hilmawan
4cd612f92b Extension: Notion Icons (#250)
* Upload mod.js, styles.css, and icons.json

* Move icon.json to notion-enhancer/icons

* Update mod.js to work with the new icons repo
2020-11-14 09:29:50 +11:00
06b56538cf #211 remove z-index override preventing format dropdowns in table view from opening 2020-11-12 00:58:48 +11:00
a94f4165d0 tabs focus properly 2020-11-12 00:20:55 +11:00
0b29387c53 #220 stricter keyboard shortcut listeners 2020-11-12 00:05:03 +11:00
0acb214b19 #192 remove draggable-indicator dots from tabs ext. in menu 2020-11-11 23:39:42 +11:00
c43b4a14f1 #204 empty hotkeys won't trigger 2020-11-11 23:29:48 +11:00
81f539f65e don't try loading the default page if it doesn't exist 2020-11-11 23:04:23 +11:00
d919493094 less-broken loading of things 2020-11-11 22:55:35 +11:00
53d7472c5e load tabs.css and variables.css into notion container 2020-11-11 22:29:02 +11:00
fb88dc5a90 load menu.css and variables.css into enhancer menu 2020-11-11 22:14:05 +11:00
2fc1e66cff split app.css and variables.css, load both into main window + add relationship lines to numbered lists
fonts should now be added to variables.css instead of mod.js
2020-11-11 21:48:54 +11:00
imgbot[bot]
e7ad0fb51e [ImgBot] Optimize images (#241)
*Total -- 245.40kb -> 231.45kb (5.68%)

/mods/core/icons/question.svg -- 0.91kb -> 0.83kb (8.61%)
/notion-enhancer v0.10.0 banner.jpg -- 242.90kb -> 229.08kb (5.69%)
/mods/topbar-icons/icons/updates_on.svg -- 0.16kb -> 0.15kb (4.32%)
/mods/topbar-icons/icons/favorite_on.svg -- 0.19kb -> 0.19kb (4.04%)
/mods/topbar-icons/icons/updates_off.svg -- 0.20kb -> 0.19kb (3.48%)
/mods/topbar-icons/icons/share.svg -- 0.46kb -> 0.44kb (2.78%)
/mods/topbar-icons/icons/favorite_off.svg -- 0.36kb -> 0.35kb (2.71%)
/mods/scroll-to-top/arrow.svg -- 0.23kb -> 0.23kb (0.43%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

Co-authored-by: ImgBotApp <ImgBotHelp@gmail.com>
2020-11-11 18:48:55 +11:00
efb20ebd19 add pull requests to changelog, rename styles.css to app.css 2020-11-11 18:44:23 +11:00
Ryo Hilmawan
2b41b0e82c Extension: Code Line Numbers (#231)
* Added extension folder with mod.js and styles.css

* Option to show numbering on single-lined blocks

Disabled by default

* Update styles.css

* Update mod.js

Changed class name from numbered to code-numbered

* Update styles.css

Changed class name from numbered to code-numbered
2020-11-11 12:06:05 +11:00
Ryo Hilmawan
3b997d3c73 Extension: Topbar Icons (#216)
* Add icons, mod.js, and styles.css files

* Added options to mod.js

Added the option to individually select which buttons (share, updates, favorite) to replace with icons

* Update styles.css to work with options
2020-11-06 14:01:38 +11:00
Ryo Hilmawan
285aae3227 Modified tweak: Indentation lines (#215)
* Update mod.js

Changed indentation lines to a select option

* Update styles.css

Styling for each line type

* Update mod.js

Re-added description

* Update mod.js

Added a description to the scroll database toolbars tweak
2020-11-06 14:01:19 +11:00
Alexa B
80ab7b7b92 bugfix: fix #187 and typo (#208)
* docs: Fixed link to dev build instructions

* docs: README installation clarification

* docs: README installation clarification

* update windows keystroke for task manager

* More README alterations

* Add bullet condensing & bullet lines tweaks

* Revert "Add bullet condensing & bullet lines tweaks"

This reverts commit 71bc6e2c30.

* interactive hover color fixes #187

* README revert

Co-authored-by: Tom <thedragonring.bod@gmail.com>
2020-11-05 20:47:31 +11:00
Ryo Hilmawan
a306fcea23 Changed the scroll-to-top extension to use an SVG icon (#205)
* Create arrow.svg

* Update mod.js

* Update styles.css
2020-11-05 20:47:00 +11:00
Ryo Hilmawan
ce6c58ef76 Property Layout Modification (#201)
* Update mod.js

* Update styles.css
2020-11-03 22:51:47 +11:00
Alexa B
faa4ed02ed tweaks: condensed bullets and indentation lines (#199)
* docs: Fixed link to dev build instructions

* docs: README installation clarification

* docs: README installation clarification

* update windows keystroke for task manager

* More README alterations

* Add bullet condensing & bullet lines tweaks

* Revert "Add bullet condensing & bullet lines tweaks"

This reverts commit 71bc6e2c30.

* Add bullet condensing & bullet lines tweaks

* Attempt to revert README back to normal lol

* Attempt 2 to revert README back to unmodified

Co-authored-by: Tom <thedragonring.bod@gmail.com>
2020-11-03 22:44:12 +11:00
Ryo Hilmawan
58297e35bf New tweak: Scroll Database Toolbars (#198)
* Update mod.js

Added an option for scroll database toolbars

* Update styles.css

Added styling for scroll database toolbars
2020-11-03 22:39:54 +11:00
1e1c536f7b disable fadein of selected block halo with snappy transitions 2020-11-02 17:10:00 +11:00
4d5754779a tabs: fallback if text name is undefined 2020-11-02 15:58:10 +11:00
9553a49bd0 add new theme screenshots + remove bgs of existing 2020-11-02 12:18:48 +11:00
c4a890ea91 README feature list updates: new mods + options 2020-11-01 22:53:11 +11:00
b985217611 #113 only open a new window from the dock if already visible 2020-11-01 21:04:26 +11:00
f4d269bcdc #113 reshow hidden windows when clicking app icon in dock 2020-11-01 15:00:22 +11:00
e24608f734 better selectors for detecting favicons in databases 2020-11-01 14:39:06 +11:00
17ceb88ed7 tab favicon fixes: support uploaded images, use emoji for window title, work on macos 2020-11-01 14:21:00 +11:00
f6ec94b46e show 'untitled' for new pages instead of empty space 2020-11-01 12:30:10 +11:00
293e5ce228 fix #183 make weekly calendar view name case insensitive 2020-11-01 12:16:31 +11:00
dccef7815f fix menu hotkey + tab title emojis on macOS 2020-11-01 12:04:04 +11:00
eeea1c6b53 make ctrl+f popover shadow less extreme 2020-11-01 00:03:18 +11:00
6a326a12be #177 made extra padding at the bottom in focus mode toggleable 2020-10-28 17:50:55 +11:00
dc60b3d9ae platform-specific option overrides for features not required on macOS 2020-10-28 12:19:39 +11:00
bf800a0889 tabs: #84 include page icons in title 2020-10-27 20:43:32 +11:00
9d3ab72eb7 tweaks: #155 more readable line spacing 2020-10-27 19:57:20 +11:00
5d439bbdc8 common tweaks ext: #168, #176 - scrollbars, thicker bold, responsiveness, hide help, snappy transitions, dragarea height 2020-10-26 23:38:46 +11:00
cbe505c374 macos bugfixes: #151 dark mode detection in night shift + adding menubar to extensions menu + padding-left with tabs to give traffic lights space 2020-10-24 22:25:05 +11:00
e79685a6e8 make dragarea transparent in new themes 2020-10-24 13:14:41 +11:00
230bc5e248 #146 dracula theme readability/contrast improvements 2020-10-24 11:05:04 +11:00
96e13a03f0 #175 neutral theme: contrast in calendar views 2020-10-23 19:41:44 +11:00
d307a2bedf additional menu option descriptions on hover 2020-10-23 16:49:58 +11:00
f3eda9a34b auto-resolve conflicts core option 2020-10-22 12:17:53 +11:00
c0f847949f clarity improvements for scroll to top extension 2020-10-22 08:54:06 +11:00
Ryo Hilmawan
d74eae1ebf new mod: scroll-to-top (#172)
* Basic Functionality

* Added smooth scrolling option

* Added scroll down distance option

* Button hide/show animation

* Add percentage distance option

* Calculate percentage every update (as opposed to every page change)

* Calculate percentage height based on scroller and content height

* Licensing and Conventions

* Hide button on initialization if top distance is set

* Fixed bug with button visibility when opening pages
2020-10-21 22:32:10 +11:00
394a891115 theme conflicts notice in menu 2020-10-21 22:30:58 +11:00
d94629d9ed update themes to new variables 2020-10-20 11:59:22 +11:00
ca30e70062 make block text colour apply to text with backgrounds 2020-10-20 09:55:38 +11:00
78667d16d6 fix theming primary-colour text + right-to-left text in columns 2020-10-19 22:50:25 +11:00
1618b5d966 use event communication instead of variable checking for cross-window dragging = less-buggy 2020-10-19 22:03:54 +11:00
a37fcb300e cross-window draggable tabs 2020-10-19 09:33:08 +11:00
4519409050 cherry cola adjustments + tab button hover fixes + closing tabs shouldn't create weird broken things anymore 2020-10-18 22:35:56 +11:00
Alexa B
0ac87603db theme: cherry cola updates (#165)
- added some contrast and new variables
- border colour brighter
2020-10-17 10:03:41 +11:00
c40e678974 ctrl+click open in new tab 2020-10-16 22:15:14 +11:00
088c4f746b middle click close tabs + better tab animations 2020-10-16 17:26:18 +11:00
ad645227d5 #164 fix width-stretching of collections in breadcrumbs 2020-10-16 10:14:58 +11:00
02fbd0e2bc better tab picking on close: find closest/next instead of jumping to first 2020-10-15 23:59:18 +11:00
63a88e1d66 fix tab reordering and animations 2020-10-15 23:48:54 +11:00
e3391f7017 fix tab opening/closing/titles 2020-10-15 22:34:51 +11:00
82e5db751f + left/right tab switching, + remove cmd/ctrl+w from menu, - break tab opening/closing/titles 2020-10-15 22:01:28 +11:00
Alexa B
db3f89e3c4 theme: cherry cola (#161) 2020-10-15 17:57:16 +11:00
d917c3aefd #161 removed typo in variable name for brown text. 2020-10-15 12:37:51 +11:00
4b464ca87c #160 patch opening by notion://url on linux + tab bugfixes 2020-10-15 12:19:21 +11:00
6a9f9bf79a add tab keybinds: alt+1...9 tab select, ctrl+t new tab, ctrl+w close tab
need to remove ctrl+w from the window menu so it doesn't override and close the whole window
2020-10-13 23:07:45 +11:00
Alejandro Romano
a26914fdbe Tweaking readability in text-blocks by adding new variables (#156)
add line-height and margin-top variables for text-block (see #155)
2020-10-13 07:04:43 +11:00
dee0a31283 accept url or id for default page, don't override direct notion:// opens 2020-10-12 22:06:03 +11:00
ee88c63f38 split tabs into separate mod, add opt for default page, load default settings when store()-ing another mod id 2020-10-12 21:44:12 +11:00
22b4153703 Revert "squashed last 5 commits together (#154)"
This reverts commit 9da9c2aee4.
2020-10-12 19:36:51 +11:00
cb4407279e un-break titlebar+menu (not sure how it was broken?) 2020-10-12 19:36:34 +11:00
Mimi Shahzad
01fe0d6782 squashed last 5 commits together (#154) 2020-10-12 19:30:58 +11:00
Alejandro Romano
d0f273381b Add font sizing to page previews (#153)
Font sizes remained the same as default for page previews. They are not affected by custom font sizes. This change takes the same variables the full open page and apply it. Tested and working 10/10

Full open pages: .notion-frame
Overlay, preview pages: .notion-overlay-container (and .notion-scroller.vertical WITHOUT .horizontal)
2020-10-12 06:34:44 +11:00
b69fa97572 change window title to match page name instead of just 'Notion Desktop' 2020-10-11 23:38:03 +11:00
1f38797cc4 enhancer icon next to tabs opens menu + less aggressive tab focusing so searching can actually work 2020-10-11 23:31:09 +11:00
4886bbbd3e use keyup listeners instead of a globalShortcut for the enhancements menu toggle 2020-10-11 16:02:45 +11:00
3d64a5e8c8 bugfixes: match up some styling better, EACCES dest chmodding, csp re-allow fonts 2020-10-11 15:28:56 +11:00
bb18f2a1e6 bugfixes so dracula will actually load 2020-10-09 20:56:21 +11:00
09d13f3ed3 Merge branch 'dev' of github.com:dragonwocky/notion-enhancer into dev 2020-10-09 20:46:23 +11:00
0472460161 draggable/nicer-looking tabs + icon 2020-10-09 20:42:34 +11:00
Mimi Shahzad
0448e8643e Dracula theme (#145)
A theme created based on the official Dracula Theme palette found https://draculatheme.com/contribute/.
2020-10-09 09:03:41 +11:00
f0232fea9e functional tabs: needs more ux work 2020-10-08 22:50:27 +11:00
51f7f564f6 #143 remove focus mode footer from neutral theme 2020-10-08 11:05:25 +11:00
51acd63748 menu will now respect integrated titlebar setting 2020-10-08 09:58:35 +11:00
c0d7d5170b replace dragarea with titlebar in tabbable mode 2020-10-07 23:58:22 +11:00
50b2ff180d separate search working for tabs 2020-10-06 22:12:25 +11:00
9ef6317529 attempt 3 at #66 2020-10-06 11:47:33 +11:00
7a6411ad23 catch EBUSY, potential csp fix for #66 2020-10-06 10:15:30 +11:00
ecdae521b4 tabs proof-of-concept (unusable) 2020-10-02 23:06:44 +10:00
45c2ebf340 #134 bypass preview operates more reliably when keyboard shortcuts are used 2020-10-02 15:46:11 +10:00
dbf1240034 improved responsiveness + snappier transitions mode 2020-10-02 13:44:16 +10:00
a2f23a850e bugfix: toc blocks can have text colours 2020-10-02 10:43:47 +10:00
f0b62d8df3 re-orderable mods: order is saved + mods are loaded according to priority 2020-10-01 23:11:31 +10:00
Tom
e55159e3fa Merge pull request #130 from Blacksuan19/dev
mods: add material ocean theme
2020-10-01 18:40:30 +10:00
398e727ddb re-orderable mods: menu elements can be dragged 2020-10-01 13:32:50 +10:00
blacksuan19
9d342fa99e mods: add material ocean theme
Signed-off-by: blacksuan19 <i@blacksuan19.me>
2020-10-01 03:10:43 +08:00
cacb6554c7 night shift checks every interaction to respond to system changes 2020-09-30 14:43:23 +10:00
904cae5375 #126 board view shadow, remove messenger emoji set, bugfix EACCES response 2020-09-30 14:25:59 +10:00
40336e78c1 #119 emoji sets achieve without user agent 2020-09-26 16:48:36 +10:00
03c12b137d #101 weekly calendar view even if not first on page 2020-09-25 17:56:39 +10:00
287e3551b5 #114 back/forward arrows work with bypass preview 2020-09-25 17:44:55 +10:00
5655043b36 #116 fix indents and #107 unenforce full width in neutral 2020-09-25 16:23:10 +10:00
CloudHill
b09d89645c Font chooser bug fix
Fixed a small bug where it stops iterating through the font options if it encounters a blank option.
2020-09-20 14:53:09 +07:00
f39e497f4c #106: make use of user-agent for emoji sets 2020-09-20 14:41:26 +10:00
0c18f19dac extension screenshots 2020-09-20 12:43:27 +10:00
d3b444827a new theme screenshots + bugfixes 2020-09-19 23:05:43 +10:00
cc4e2fb807 word counter extension (#88) + bugfixes 2020-09-18 14:21:09 +10:00
bb3439429f properly align rtl bullet points/checkboxes #55
though more performant, this also limits rtl to page content
2020-09-17 14:37:04 +10:00
525ff40bb3 page width variables - #81 2020-09-17 13:44:16 +10:00
6299ce4b81 #97, #98, and small alterations.
(removed platform support requests, replaced getNotion() with __notion)
2020-09-17 13:06:49 +10:00
76ff3bd101 bypass preview extension - #81 2020-09-08 22:44:51 +10:00
9147eb06e4 callout theming + more text colour variables 2020-09-08 22:24:02 +10:00
Tom
8dd5c7b479 Merge pull request #89 from coryzibell/master
Add module to hide help button
2020-09-07 08:23:32 +10:00
Cory Zibell
b48cecf54d Add hide-help module content 2020-09-06 18:17:41 -04:00
Cory Zibell
d66ff14e2c Add module to hide help button 2020-09-06 18:11:23 -04:00
72551c5f67 fix #73 - block-level text colours are now changed properly, add tick/cross to search filters 2020-09-03 12:12:58 +10:00
988b78085a calendar scroll extension - #74 2020-09-02 22:56:40 +10:00
666925c081 fix property-layout again 2020-09-02 22:33:47 +10:00
c5f5ce30e5 ext. menu search upgrades (more stuff is searchable + case insensitive + cmd/ctrl f) 2020-09-02 22:21:17 +10:00
63e4b574a9 separate always-on-top into separate mod 2020-09-02 21:46:17 +10:00
6ff3a96d81 fix #69 - option to completely hide window buttons 2020-09-02 21:16:51 +10:00
513b5f4cab remove extension menu hotkey conflict + make configurable 2020-09-02 20:40:35 +10:00
0355c7d344 fix #76, height of weekly calendar view 2020-09-02 15:39:53 +10:00
3a608f8aff page titles now respond to small-text mode 2020-09-02 11:33:18 +10:00
850610b213 font imports working in menu + font-chooser improvements 2020-09-02 11:10:01 +10:00
ae3760e193 halved selectors for better perf., added wip littlepig themes 2020-09-02 08:49:38 +10:00
Tom
15963bae36 Merge pull request #63 from torchatlas/master
NEW MOD: Font Chooser
2020-08-29 22:22:26 +10:00
1b66802fc6 fix #65: separate bg and select variables. 2020-08-29 14:25:39 +10:00
Torch
591b39494a Update mod.js 2020-08-28 12:10:50 -04:00
9d79f7462f property-layout finally working regardless of banner 2020-08-29 02:09:04 +10:00
Torch
45282e0abf Added Font Chooser 2020-08-28 12:01:46 -04:00
ffa35c74ae better erroring (#56), menu tweaking, gallery fullpage variable fix 2020-08-29 00:14:29 +10:00
5117836dc7 fix #59 + clarity improvements 2020-08-28 22:37:46 +10:00
b019a1cb83 fix #54 + padding issues in preview 2020-08-28 14:41:34 +10:00
21a6cc2be5 fix #58 (caret-color was being mistaken for color) 2020-08-28 12:48:23 +10:00
438ad10522 update property-layout mod to notion's changes 2020-08-28 09:13:34 +10:00
ImgBotApp
1901832d0e [ImgBot] Optimize images
*Total -- 58.29kb -> 10.21kb (82.49%)

/mods/core/icons/user.png -- 44.36kb -> 0.32kb (99.29%)
/mods/core/icons/mac+linux.png -- 12.08kb -> 8.10kb (32.94%)
/mods/core/icons/file.svg -- 0.29kb -> 0.28kb (4.97%)
/mods/core/icons/close.svg -- 0.34kb -> 0.33kb (3.48%)
/mods/core/icons/minimize.svg -- 0.19kb -> 0.19kb (3.03%)
/mods/core/icons/alwaysontop_on.svg -- 0.23kb -> 0.23kb (2.53%)
/mods/core/icons/alwaysontop_off.svg -- 0.23kb -> 0.23kb (2.53%)
/mods/core/icons/maximize_off.svg -- 0.24kb -> 0.23kb (2.49%)
/mods/core/icons/maximize_on.svg -- 0.32kb -> 0.32kb (1.81%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
2020-08-27 13:22:57 +00:00
b9ce8e5e54 add discord to tray 2020-08-27 23:11:49 +10:00
a8dd8cb145 custom logo + discord invite 2020-08-27 23:00:08 +10:00
6081bdb563 dev docs 2020-08-26 22:42:49 +10:00
48eba9b956 contributing guide, css transitions, bg of account picker 2020-08-20 10:08:29 +10:00
4ad8a9446b readme additions + bugfixes 2020-08-19 00:13:14 +10:00
05c7ca099f property layout width fixed for fullpage pages 2020-08-18 21:44:41 +10:00
7af9b7836d property layout extension ✔ 2020-08-18 11:40:05 +10:00
5275d71fd6 reduce lag due to maximization detect + wip property layout 2020-08-18 09:53:34 +10:00
58bbb9e385 remove loop from core client.js 2020-08-17 23:43:43 +10:00
e787427214 weekly view working, app relaunch btn in menu modified alert 2020-08-17 22:55:51 +10:00
583e96ac1a various perf stuff + bugfixes + attempt at weekly view 2020-08-16 23:44:45 +10:00
ebc9adc616 perf improvements + fullwidth page banner in preview 2020-08-16 12:42:03 +10:00
94830b5da5 make it possible to enabled/disable multiple extensions 2020-08-15 22:44:31 +10:00
3c14f1e85d right-to-left extension 2020-08-15 22:20:20 +10:00
cf0d516234 night shift extension 2020-08-15 21:58:39 +10:00
3aa5cdef18 emoji sets extension 2020-08-14 23:58:21 +10:00
a9a6fc5929 pastel dark theme + custom author definitions 2020-08-14 23:18:38 +10:00
7f2270904b purple gameish theme... need to link to reddit account 2020-08-13 23:24:45 +10:00
ff86afd8b8 add colour picker for dark+ primary colour 2020-08-12 23:32:44 +10:00
44b0a0e378 dark+ fixes, general slicking up 2020-08-11 21:24:00 +10:00
554f93efac various css tweaks and fixes 2020-08-11 18:38:18 +10:00
f7c71eb9c7 patch removal and help commands + separate focus mode into an extension 2020-08-11 11:16:23 +10:00
db7992cfc3 patch font sizes 2020-08-11 10:04:55 +10:00
a45601b2ad theoretically patch broken windows install 2020-08-11 09:32:22 +10:00
78b9510e93 port alejandro's neutral theme to new variables 2020-08-09 23:29:27 +10:00
eae51c6021 toggle window tray opt + css preview padding 2020-08-09 19:35:03 +10:00
3c50f5cbbc dark+ theme (code highlight needs work) 2020-08-06 21:33:21 +10:00
7f779e35e5 working menu search 2020-08-05 21:48:11 +10:00
0a6a540a41 menu options: input + files 2020-08-04 23:02:20 +10:00
92501bd7e1 menu options: toggles + selects 2020-08-04 15:32:04 +10:00
6dacae46b5 improve markdown regexes 2020-08-04 13:13:01 +10:00
158ce182df mod toggling, first extension: bracketed links 2020-08-04 00:31:27 +10:00
d8351aa49e mod info boxes 2020-08-02 23:14:13 +10:00
19593e1d01 add alerts (inc. update checker) to menu 2020-08-02 16:26:28 +10:00
7d0560228b button spacing bugfix 2020-08-02 09:01:12 +10:00
f6b52e5c02 theme menu window + bunch of other tweaks 2020-08-01 23:46:43 +10:00
8dd7d0649c menu window creation 2020-07-28 19:03:35 +10:00
9f92ff325d refactor some stuff, fix some bugs, apply theme to ctrl+f popup 2020-07-26 16:32:55 +10:00
06211688b6 light theoretically 100% :) 2020-07-25 22:49:08 +10:00
5c84fbebb6 light 90% + other tweaks 2020-07-25 15:16:15 +10:00
771aa0b493 dark theme bugfixes: focused input borders, weird lines in tables 2020-07-25 11:29:39 +10:00
2f74449189 dark theme variables complete (?) + scrollbar fix + titlebar tweaks 2020-07-24 23:52:21 +10:00
830492e181 more dark theme stuff, inc. bugfixes + code higlight 2020-07-23 23:33:09 +10:00
2d37b807ea collect theme variables: dark colours 2020-07-22 23:45:59 +10:00
8a1709c559 maximise icon updates as needed 2020-07-21 09:47:19 +10:00
9a012eb3a7 configurable dragarea size 2020-07-21 00:09:24 +10:00
35a411b977 titlebar + scrollbars 2020-07-19 22:50:59 +10:00
a3e55c6121 taken control of createWindow 2020-07-19 16:24:34 +10:00
0621a5710c de-async-ifying stuff = tray fixed! 2020-07-18 23:50:56 +10:00
48fa62d75d tray failing: every time something starts working everything else falls apart :/ 2020-07-18 23:21:55 +10:00
8440a3dcca add store to loader, bugfix homedir with wsl 2020-07-16 23:48:09 +10:00
8925234dc5 modloader insertion 2020-07-16 23:14:41 +10:00
2cb52722dd redesign module system after considerations of what is most technologically friendly (both to implement and use) 2020-07-14 21:28:05 +10:00
5c648be5eb document mod.js, prepare to load 2020-07-14 13:01:07 +10:00
7cbb744e5f basic mod structure 2020-07-14 00:23:21 +10:00
297 changed files with 13586 additions and 13671 deletions

View File

@ -1,22 +0,0 @@
---
name: bug report
about: experienced any broken/glitchy enhancer behaviour?
title: ''
labels: bug
assignees: ''
---
FILL OUT THIS TEMPLATE, REMOVING/REPLACING ALL NON-BOLD TEXT WITH YOUR OWN INFORMATION.
BE AS CLEAR AND CONCISE AS POSSIBLE.
**describe the bug**
what is the bug - what happens?
**expected behaviour**
why is this a bug - what should be happening?
**screenshots**
if applicable, add screenshots of your problem.
**platform**
what OS are you using? e.g. windows 7, windows 10, WSL, ubuntu, arch linux, macOS

View File

@ -1,45 +0,0 @@
---
name: feature proposal
about: got an idea/request/suggestion for a new feature/module?
title: ''
labels: enhancement
assignees: ''
---
FILL OUT THIS TEMPLATE, REMOVING/REPLACING ALL NON-BOLD TEXT WITH YOUR OWN INFORMATION.
BE AS CLEAR AND CONCISE AS POSSIBLE.
ONCE ALL INFORMATION HERE HAS BEEN FILLED IN, THE MODULE WILL BE REVIEWED & DISCUSSED
BY OTHER CONTRIBUTORS AND BY THE COMMUNITY. IF IT IS APPROVED AS SOMETHING USEFUL/BENEFICIAL,
THEN IT IS GUARANTEED TO BE ADDED TO THE ENHANCER.
IF YOU WOULD LIKE TO CONTRIBUTE AND CODE THIS YOURSELF, THAT'D BE AWESOME! JUST OPEN A
PULL REQUEST WHEN YOU'RE READY. IF PROGRAMMING ISN'T YOUR THING, ANOTHER DEV WILL COME
ALONG AND PICK THE IDEA UP.
ONCE SOMEONE STARTS WORK ON THIS, THE ISSUE WILL BE ASSIGNED TO THEIR GITHUB ACCOUNT
SO MULTIPLE PEOPLE DON'T ALL WORK ON THE SAME THING: IF YOU PLAN ON MAKING THIS, SAY SO!
**problem**
why is this feature necessary? how will it help? what existing shortcomings does it address?
**solution**
how will this feature appear/act?
how could this be technically implemented using the available
capabilities of the enhancer and notion?
**cons**
what are the potential costs or dangers of this feature, or things that may go
outside of the enhancer's scope? e.g. bad performance, security issues, or
modifying the data notion stores.
**alternatives**
would a different feature remove the need for this?
does this need to be implemented by the enhancer? could an external service work better?
e.g. playing background music via noisli or youtube.

View File

@ -1,26 +0,0 @@
name: potential duplicates
on:
issues:
types: [opened, edited]
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: bubkoo/potential-duplicates@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Label to set, when potential duplicates are detected.
label: potential-duplicate
# Get issues with state to compare. Supported state: 'all', 'closed', 'open'.
state: all
# If similarity is higher than this threshold([0,1]), issue will be marked as duplicate.
threshold: 0.6
# Reactions to be add to comment when potential duplicates are detected.
# Available reactions: "-1", "+1", "confused", "laugh", "heart", "hooray", "rocket", "eyes"
reactions: 'confused'
# Comment to post when potential duplicates are detected.
comment: >
potential duplicates:
{{#issues}}
- [#{{ number }}] {{ title }} ({{ accuracy }}%)
{{/issues}}

107
.gitignore vendored
View File

@ -1,104 +1,9 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# builds
dist/
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
# dependencies
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
# Next.js build output
.next
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# yarn
.yarn/
.pnp.*

View File

@ -1,9 +1,102 @@
# changelog
**potential future features (not confirmed)**
### v0.11.0 (dev)
- [highlight/mark viewer](https://chrome.google.com/webstore/detail/notion%2B-mark-manager/hipgmnlpnimedfepbfbfiaobohhffcfc)
- [advanced math editor](https://github.com/Manueloccorso/NotionMathEditor_BrowserExtension)
a complete redesign & rewrite of the enhancer, with new features and a port to the browser as a chrome extension.
#### new
- cross-environment and properly documented api to replace helpers.
- cross-environment mod loader structure.
- "integrations", a category of mods that can access/use an unofficial notion api.
- notifications sourced from an online endpoint for sending global user alerts.
- simplify user installations by depending on the chrome web store and [notion-repackaged](https://github.com/notion-enhancer/notion-repackaged).
- separate menu profiles for mod configurations.
- a hotkey option type that allows typing in/pressing a hotkey to enter it, instead of typing.
- a rainbow indentation lines style.
- border & background style options for the code line numbers extension.
- an icon sets option to encode images to data urls to prevent quality reduction.
- customisation of integrated titlebar & always on top window buttons.
- 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.
- a hotkey for reopening closed tabs.
- an option to remember last open tabs for a continue-where-you-left-off experience
(recently active tabs are reopened after an app relaunch).
#### improved
- split the core mod into separate mods for specific features.
- theming variables that are applied more specifically, less laggy, and less complicated.
- merged bracketed-links into tweaks.
- a redesigned menu with nicer ui, separate categories for mods and a sidebar for configuration.
- simplified and smoothened the side panel + moved it to the core so any mod can hook into it.
- font chooser option for heading fonts.
- renamed "property-layout" to "collapsible properties", added per-page memory of collapse state.
- chevron icon instead of arrow for scroll to top.
- moved word counter to display in the side panel instead of within the page,
implemented a more accurate word counter method.
- the topbar icons extension defaults to the notion default topbar icons for comment/updates/favorite/more,
but can revert them to text (it still adds a custom icon for the share button).
- relative indenting in outliner.
- rtl support for toggles, indentation lines, table of contents and databases + force inline math to ltr.
- replaced the "truncated table titles" extension with a "truncated titles" extension
with an option to truncate timeline item titles.
- renamed "notion icons" to "icon sets" with new support for uploading/reusing custom icons
directly within the icon picker.
- moved the tray to its own configurable and enable/disable-able mod, with window management enhancements
that follow more sensible defaults and work more reliably.
- tabs will auto shrink/expand to take up available space instead of wrapping to a second line.
- a visually revamped cli to more clearly and aesthetically communicate status and usage.
- cli can now detect and apply to user-only installations on macOS.
- a shortcut built into the cli to fix the "you do not have permission to open this app" error on macos.
#### removed
- integrated scrollbar tweak (notion now includes by default).
- js insert. css insert moved to tweaks mod.
- majority of layout and font size variables - better to leave former to notion and use `ctrl +`/`ctrl -` for latter.
- the "panel sites" extension, due to it's limited/buggy functionality and incompatibility with reimplementation.
#### fixed
- bypass csp restrictions.
- many. like many many. all the bugfixes. (mostly a side effect of completely rewriting everything,
but reported extension-specific bugs were all intentionally fixed.)
#### themes
- "nord" = an arctic, north-bluish color palette.
- "gruvbox light" = a sepia, 'retro groove' palette based on the vim theme of the same name.
- "gruvbox dark" = a gray, 'retro groove' palette based on the vim theme of the same name.
- "light+" = a simple white theme that brightens coloured text and blocks,
with configurable accents (formerly littlepig light).
- "playful purple" = a purple-shaded theme with bright highlights (formerly littlepig dark and gameish).
- "pinky boom" = pinkify your life.
#### extensions
- "calendar scroll" = add a button to jump down to the current week in fullpage/infinite-scroll calendars.
- "global block links" = easily copy the global link of a page or block.
- "collapsible headers" = adds toggles to collapse header sections of pages.
- "simpler databases" = adds a menu to inline databases to toggle ui elements.
- "view scale" = zoom in/out of the notion window with the mousewheel or a visual slider (`ctrl/cmd +/-` are available in-app by default).
#### tweaks
- wrap tables to page width. - hide "Type '/' for commands".
- quote block quotation marks.
- responsive columns breakpoint (%).
- accented links.
- full width pages.
- image alignment (center/left/right).
#### integrations
- "quick note" = adds a hotkey & a button in the bottom right corner to jump to a new page in a notes database (target database id must be set).
**below this point the enhancer was desktop-only. in v0.11.0 it was been ported to also**
**run as a chrome extension. changes made to both are indicated above.**
### v0.10.2 (2020-12-05)
@ -271,7 +364,7 @@ complete rewrite with node.js.
- bugfix: odd mix of `\\` and `/` being used for windows filepaths.
- bugfix: app no longer crashes when sidebar is toggled.
> 📥 [notion-enhancer.v0.7.0.zip](https://github.com/notion-enhancer/notion-enhancer/archive/v0.7.0.zip)
> 📥 [notion-enhancer.v0.7.0.zip](https://github.com/notion-enhancer/desktop/archive/v0.7.0.zip)
### v0.6.0 (2020-06-30)
@ -285,7 +378,7 @@ complete rewrite with node.js.
- improved: more obviously visible drag area.
- bugfix: specify UTF-8 encoding to prevent multibyte/gbk codec errors (thanks to [@etnperlong](https://github.com/etnperlong)).
> 📥 [notion-enhancer.v0.6.0.zip](https://github.com/notion-enhancer/notion-enhancer/archive/v0.6.0.zip)
> 📥 [notion-enhancer.v0.6.0.zip](https://github.com/notion-enhancer/desktop/archive/v0.6.0.zip)
### v0.5.0 (2020-05-23)
@ -297,12 +390,12 @@ complete rewrite with node.js.
improved: scrollbar colours that fit better with notion's theming.
- bugfix: un-break having multiple notion windows open.
> 📥 [notion-enhancer.v0.5.0.zip](https://github.com/notion-enhancer/notion-enhancer/archive/v0.5.0.zip)
> 📥 [notion-enhancer.v0.5.0.zip](https://github.com/notion-enhancer/desktop/archive/v0.5.0.zip)
**development here taken over by [@dragonwocky](https://github.com/dragonwocky).**
**the ~~crossed out~~ features below are no longer features included by default,**
**but can still easily be added as [custom tweaks](TWEAKS.md).**
**but can still easily be added as [custom tweaks](https://github.com/notion-enhancer/tweaks).**
### v0.4.1 (2020-02-13)

View File

@ -1,111 +0,0 @@
# contributing
the enhancer is a tool for the community, so who best to build it but the community?
these guidelines are designed for smooth communication, management and development on this project.
following them shows respect to the developer/s spending their free time on it, and makes it easiest for them to improve the tool.
**found a bug / something isn't working as expected?** create a
[bug report](https://github.com/notion-enhancer/notion-enhancer/issues/new?labels=bug&template=bug-report.md).
> SECURITY ISSUE? (e.g. PERSONAL/NOTION DATA BEING INTERFERED WITH)
> EMAIL ME INSTEAD: [thedragonring.bod@gmail.com](mailto:thedragonring.bod@gmail.com)
**have a cool new feature idea / there's something you just wish you could do?** submit a
[feature proposal](https://github.com/notion-enhancer/notion-enhancer/issues/new?labels=enhancement&template=feature-proposal.md).
> enhancements are applied only locally -
> features should be designed only to improve the user experience.
**know your way around notion/electron/js/css and have some code to contribute?** great! read below for guidelines
on how to create a helpful pull request and what happens with your code afterwards. it's probably also helpful to
join the [discord server](https://discord.gg/sFWPXtA).
**for information on how to actually create a theme or module with the notion-enhancer api, check the [docs](DOCUMENTATION.md).**
## testing
first, remove any other installations of the enhancer: `npm remove -g notion-enhancer`
to download and install the latest code, run:
```sh
git clone https://github.com/notion-enhancer/notion-enhancer
cd notion-enhancer
git checkout dev
npm link
notion-enhancer apply -y
```
to update the dev build, go into the downloaded folder and run `git pull`. (make sure any work-in-progress themes etc. are copied somewhere else safely first.)
to remove the dev build, go into the downloaded folder and run:
```sh
notion-enhancer remove -n
npm unlink
```
## conventions
the enhancer is a **core** extended by included **modules**.
the core can be further split into the **installer** and the **modloader**.
modules are either **extensions** or **themes**.
each module is separately versioned, following the [semver](https://semver.org/) scheme.
depending on the content and scale of a contribution, it may constitute an update on its own or may be merged into a larger update.
to keep a consistent & informative code style it is preferred to name variables with
`snake_case`, functions/methods with `camelCase`, and classes with `PascalCase`.
if a variable is a reference to a DOM element, it may be helpful to prefix it with a `$`.
some variables beginning with a double underscore are `__folder` paths and `ALL_CAPS` variables
are constant. this is not required, but these styles should not be used for any other purpose.
the master branch is kept consistent with the current release,
so all changes should be made to the dev branch.
## review
active core devs will manually look through each pull request and communicate with contributors before merging to
make sure it is:
**a) safe.** system details (e.g. IP, clipboard) + notion user data are considered private unless directly shared by the user.
none of this should be accessed or transmitted to an external server.
**b) functional.** is there a better way to do this? can extra dependencies be removed or replaced by newer web technologies?
how can this be made as user-friendly as possible?
**c) bug-free.** where possible, code should be tested on a variety of platforms in a variety of situations so it can be
confirmed that it won't break anything for the user and is robust enough to handle use by both
power users and non-tech-savvy users.
## translating
future versions of the enhancer will have multi-language support.
if you are willing to help with translation, let me know and i'll contact you when i'm ready.
## licensing
this project is distributed under the [MIT](https://choosealicense.com/licenses/mit/) license.
the project as a whole is copyrighted by core devs in the [LICENSE](LICENSE) file.
when modifying a file, add your copyright to it in the format:
```
/*
* module or project name
* (c) year name <email> (website)
* under the MIT license
*/
```
all code contributed to this repository remains attributed to the contributor,
but full rights are granted for it to be used under the terms of the MIT license.
on the occasion that the contributed code should be removed or overwritten,
the contributor's copyright may be removed from the file.
by opening a pull request in this repository, you agree to the above conditions.
dependencies remain separately licensed to their various authors.

View File

@ -1,217 +0,0 @@
# documentation
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](CONTRIBUTING.md).
for support, join the [discord server](https://discord.gg/sFWPXtA).
## creating a mod
_to understand best how notion's app works, check out [the electron docs](https://www.electronjs.org/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](mods)_
_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](CONTRIBUTING.md#testing). 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`,
`variables.css`, `app.css`, `tabs.css` and `menu.css`.
| file | description |
| ------------ | --------------------------------------------------------------------- |
| `mod.js` | **required:** describes the module and contains functional javascript |
| `styles.css` | **optional:** a css file automatically inserted into each app window |
## mod.js
```js
// 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,
}
}>,
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.
) {}
}
};
```
| key | value | type |
| ------- | ----------------------------------------------------------------------------------------------- | ---------------------- |
| id | **required:** uuidv4 - generate a new one [here](https://www.uuidgenerator.net) | _string_ |
| name | **required:** short name (e.g. `'ocean theme'`) | _string_ |
| tags | **required:** categories/type (e.g. `'extension'`, `'theme'`, `'light'`, `'dark'`) | _array\<string\>_ |
| desc | **optional:** 1-3 sentence description of what the module is/does, with basic markdown support. | _string_ |
| version | **required:** semver (e.g. `'0.3.7'`) | _string_ |
| author | **required:** see below: original extension creator | _string_ or \<object\> |
| options | **optional:** see below: options made available in the enhancer menu (accessible from the tray) | _array\<object\>_ |
| hacks | **optional:** see below: code inserted at various points | _object_ |
> 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.
#### author
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:
| key | value | type |
| ------ | ------------------------------------------ | -------- |
| name | **required:** author's (your?) name | _string_ |
| link | **required:** link to the author's profile | _string_ |
| avatar | **required:** url for the author's avatar | _string_ |
#### options
| key | value | type |
| ----------------- | ---------------------------------------------------------------------------------------- | --------------------------- |
| key | **required:** key to save value to the mod `store` | _string_ |
| label | **required:** short description/name of option to be shown in menu | _string_ |
| desc | **optional:** extended information to be shown on hover | _string_ |
| type | **required:** input type (see below) | _string_ |
| extensions | **optional:** allowed file extensions (only use with a file option), e.g. `['js', 'ts']` | _array\<string\>_ |
| value | **optional:** default or possible value/s for option | see below |
| platformOverwrite | **optional:** remove the option from the menu and force a value on a specific platform | _\<object\>_ as shown above |
| type | value |
| ------ | -------------------- |
| toggle | _boolean_ |
| select | _array\<string\>_ |
| input | _string_ or _number_ |
| color | _string_ |
| file | none |
> the file option stores only a filepath, not the file itself.
## hacks
each "hack" is a function taking 2 arguments.
1. the **`store`** argument, which allows access to the module settings/options defined in `mod.js`
(those set in the menu, or used internally by the module). each module store is automatically saved to +
loaded from `~/.notion-enhancer/id.json`.
it should always be called as `store({ defaults })` (not stored in a variable),
but otherwise treated as a normal object to access and set things.
2. the **`__exports`** argument, which is the `module.exports` of the file being modded.
this can be used to call or replace functions from notion.
this hack is applied to whichever file (`.js`-only) is set as the function key. these can be found within the `app` folder.
files under the `main` folder are executed on app launch in a process shared
between all app windows (consider it a backend). files under the `renderer` folder are
executed on window launch in a pre-window process: the client-side javascript
normally expected to run on a webpage.
unless scripts need to change app logic (e.g. to add the tray menu),
they should usually be applied to `renderer/preload.js` to interact
with the app window itself.
e.g.
```js
// sayhi.js
module.exports = function (store, __exports) {
document.addEventListener('readystatechange', (event) => {
if (document.readyState !== 'complete') return false;
console.log(store({ name: 'dragonwocky' }).name);
});
};
// mod.js
module.exports.hacks = {
'renderer/preload.js': require('./sayhi.js'),
};
```
### the `enhancement://` protocol
any files within the `mods` folder can be loaded with the `enhancement://` protocol.
for example, inserting an image from the core mod: `<img src="enhancement://core/image.png">`.
## `variables.css`
**inserted into all windows.**
(put font import statements here too.)
the enhancer has been designed with theming in mind, so as much of notion's colours
and typography as possible and some basic spacing (both for the light and dark themes) have been mapped out
using css variables.
this set of variables is 100% mandatory to use if you wish to use or change anything they handle
(particularly colours). this is necessary to keep all themes consistently working
(e.g. responding properly to light/dark theme changes), and it makes theming a lot easier -
notion's html structure needs some complex selectors to properly modify it,
and it means theme authors don't have to worry about separately updating their theme every time something changes.
the full/up-to-date list of variables and their default values can be found in the
[core `variables.css` file](mods/core/variables.css). each variable is named something along the lines of
`--theme_mode--target_name-property`. still not sure what a variable does? try changing it and seeing what happens.
these are all made possible by the core module. if you believe this set of variables is buggy or lacking in any way,
consider opening a pull request to fix those issues - please do not try and reinvent the wheel unnecessarily.
> ### using variables
>
> variables should be defined per-mode, but used without specifying. for example:
>
> ```css
> :root {
> --theme_dark--main: rgb(5, 5, 5);
> }
> .demo-element {
> background: var(--theme--main);
> }
> ```
>
> this to simplify styling and make it possible for things like the "night shift" module to work,
> by leaving the choice of light/dark theme up to the user and then directing the right values to
> the relevant variables.
## `app.css`
**inserted into the notion app window.**
## `tabs.css`
**inserted into the notion app container for styling tabs.**
## `menu.css`
**inserted into the enhancements menu.**

View File

@ -1,7 +1,6 @@
MIT License
Copyright (c) 2020 TarasokUA
Copyright (c) 2020 dragonwocky
Copyright (c) 2023 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@ -19,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.

457
README.md
View File

@ -1,456 +1,5 @@
# <img src="./mods/core/icons/mac+linux.png" height="20px"> notion-enhancer
# notion-enhancer/desktop
notion.so is a pretty awesome tool already, but there's always room for improvements.
it might just be a preference, it might be something crucial to your setup,
it might be something users have been asking for for a long time,
or it might even be something you haven't realised you need yet
\- there's something that would make your user experience a lot better.
Customise the all-in-one productivity workspace Notion.
this package is a mod-loader for the desktop app, with custom colour theming and extra feature enhancements.
want to contribute? check out the [contribution guidelines](CONTRIBUTING.md) and the [documentation](DOCUMENTATION.md).
for support, join the [discord server](https://discord.gg/sFWPXtA).
### supported desktop clients
- the [official windows/mac releases](https://notion.so/desktop).
- the arch linux AUR [notion-app](https://aur.archlinux.org/packages/notion-app/) package.
- the linux [notion-app](https://github.com/jaredallard/notion-app) installer.
- [@haydn-jones](https://github.com/haydn-jones/)'s fork of the
linux [notion-deb-builder](https://github.com/haydn-jones/notion-deb-builder).
linux clients must use a notion version >= 2.0.8.
mobile clients are not supported and due to system limitations/restrictions cannot be.
a chrome extension may be coming soon for web client support.
## installation
> **if you are updating from v0.7.0 or earlier,** things have changed, more information is available
> in this [update guide](UPDATING.md). please read that before following these instructions.
- ensure that no notion windows/processes are running by ending all Notion processes in your task manager.
- `CMD + ALT + ESC` on mac and `CTRL + SHIFT + ESC` on windows/linux to open task manager.
- [install node.js](https://nodejs.org/en/download/)
- you may need to restart your computer.
- notion-enhancer will use node.js, you do not need to interact with it aside from downloading to install notion-enhancer.
- open your computer's terminal, **not the node.js command prompt.**
- **windows 10:** search in your start menu (click windows key or icon in bottom left of screen) for _'cmd'_ or _'command prompt'_.
- **mac:** search in spotlight (magnifying glass in top right of screen) for _'terminal'_.
- type and enter the following line(s) based on your operating system, if there are multiple lines, make sure to enter them _one by one_ .
- **windows 10:**
```
npm i -g notion-enhancer
```
- **mac:** this may ask you to enter your password, instead of hiding your password with \*\*\* symbols, mac terminal hides it by making it invisible. simply type your password and click enter.
```
sudo chmod -R a+wr /usr/local/lib/node_modules
sudo chmod -R a+wr /usr/local/bin
sudo chmod -R a+wr /Applications/Notion.app/Contents/Resources
npm i -g notion-enhancer
```
- **debian/ubuntu, chromeOS, wsl (to modify the win10 app):**
```
bash curl -sL https://deb.nodesource.com setup_current.x | sudo -E bash -
sudo apt-get install -y nodejs
npm i -g notion-enhancer
```
- **arch linux, manjaro:**
- install the [aur package](https://aur.archlinux.org/packages/notion-enhancer) with your aur helper (e.g. `yay -S notion-enhancer`).
### command-line interface
the enhancements should be automatically applied on installation
and automatically removed on uninstallation.
on some platforms this may throw errors if done without
elevated/admin permissions, though, so if it hasn't automatically
installed you will still need to use these commands.
```
Usage:
$ notion-enhancer <command> [options]
Commands:
apply : add enhancements to the notion app
remove : return notion to its pre-enhanced/pre-modded state
check : check the current state of the notion app
For more info, run any command with the `--help` flag:
$ notion-enhancer apply --help
$ notion-enhancer remove --help
$ notion-enhancer check --help
Options:
-y, --yes : skip prompts (may overwrite data)
-n, --no : skip prompts (may cause failures)
-d, --dev : show detailed error messages (for debug purposes)
-h, --help : display usage information
-v, --version : display version number
```
### faq
**when will the update be out?**
i code this in my free time, in-between my other commitments. there are no ETAs.
**the themes aren't working?**
if you pick a dark theme it will only be applied if notion is in dark mode,
and if you pick a light theme it will only work if notion is in light mode.
do `CMD/CTRL+SHIFT+L` to toggle between them.
**is this against notion's terms of service? can i get in trouble for using it?**
definitely not! i contacted their support team to check, and the response was awesome:
> "Thanks for taking the time to share this with us. Userscripts and userstyles are definitely
> cool ideas and would be helpful for many users! ... I'll also share this with the rest of the
> team to take to heart for future improvements."
**how do i uninstall the enhancer?**
run `npm remove -g notion-enhancer`.
## features
most of the enhancer's functionality is split into configurable enhancement modules,
but some basic improvements necessary for things to work are built in by values:
- the notion:// url scheme/protocol is patched to work on linux.
- a tray/menubar icon: links relevant to the enhancer + buttons to manage notion windows.
once applied, modules can be configured via the graphical menu,
which is opened from the tray/menubar icon or with `OPTION/ALT+E`.
![](https://user-images.githubusercontent.com/16874139/97819046-34e8b600-1cfa-11eb-8fa6-a3ad5374cd0b.png)
currently all modules come pre-installed for technical reasons, security assurance, and ease-of-use.
these include:
### notion-enhancer core
**tags:** #core
**description:** the cli, modloader, menu, & tray.
**author:** [dragonwocky](https://github.com/dragonwocky/)
| option | extended description | type | values/defaults | platform-specific details |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -------------------------- | ------------------------- |
| auto-resolve theme conflicts | when a theme is enabled any other themes of the same mode (light/dark) will be disabled. | toggle | no | |
| hide app on open | app can be made visible by clicking the tray icon or using the hotkey. | toggle | no | |
| auto-maximise windows | whenever a window is un-hidden or is created it will be maximised. | toggle | no | |
| close window to the tray | pressing the × close button will hide the app instead of quitting it. it can be re-shown by clicking the tray icon or using the hotkey. | toggle | yes | |
| integrated titlebar | replace the native titlebar with buttons inset into the app. | toggle | yes | macOS: forced on |
| tiling window manager mode | completely remove the close/minimise/maximise buttons - this is for a special type of window manager. if you don't understand it, don't use it. | toggle | no | macOS: forced off |
| window display hotkey | used to toggle hiding/showing all app windows. | [accelerator](https://github.com/electron/electron/blob/master/docs/api/accelerator.md) input | `CommandOrControl+Shift+A` | |
| open enhancements menu hotkey | used to toggle opening/closing this menu while notion is focused. | [accelerator](https://github.com/electron/electron/blob/master/docs/api/accelerator.md) input | `Alt+E` | |
| values/defaults page id/url | every new tab/window that isn't opening a url via the notion:// protocol will load this page. to get a page link from within the app, go to the triple-dot menu and click "copy link". leave blank to just load the last page you opened. | text input | `Alt+E` | |
![](https://user-images.githubusercontent.com/16874139/97819249-7a59b300-1cfb-11eb-99fa-de945fe8e3d9.png)
### tabs
**tags:** #core #extension
**description:** have multiple notion pages open in a single window.
**author:** [dragonwocky](https://github.com/dragonwocky/)
| option | type | values/defaults |
| --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| tab select modifier (key+1, +2, +3, ... +9 and key+left/right arrows) | select | `Alt`, `Command`, `Control`, `Super`, `Alt+Shift`, `Command+Shift`, `Control+Shift`, `Super+Shift` |
| new tab keybinding | [accelerator](https://github.com/electron/electron/blob/master/docs/api/accelerator.md) input | `CommandOrControl+T` |
| close tab keybinding | [accelerator](https://github.com/electron/electron/blob/master/docs/api/accelerator.md) input | `CommandOrControl+W` |
![](https://user-images.githubusercontent.com/16874139/97821456-9dd62b00-1d06-11eb-8c3a-e9f77bbd740e.png)
### tweaks
**tags:** #core #extension
**description:** common style/layout changes.
**author:** [dragonwocky](https://github.com/dragonwocky/)
| option | extended description | type | values/defaults | platform-specific details |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------ | --------------- | ------------------------- |
| height of frameless dragarea | the rectangle added at the top of a window in "integrated titlebar" mode, used to drag/move the window. | number input | 15 | macOS: forced to 0 |
| width to wrap columns at | the size in pixels below which in-page columns are resized to appear full width so content isn't squished. | number input | 600 | |
| integrated scrollbars | use scrollbars that fit better into notion's ui instead of the default chrome ones. | toggle | yes | |
| snappy transitions | | toggle | no | |
| thicker bold text | | toggle | yes | |
| more readable line spacing | | toggle | no | |
| hide help button | | toggle | no | |
![](https://user-images.githubusercontent.com/16874139/97819829-1638ee00-1cff-11eb-80c6-f270c2ba0f37.png)
### always on top
**tags:** #extension
**description:** add an arrow/button to show the notion window
on top of other windows even if it's not focused.
**author:** [dragonwocky](https://github.com/dragonwocky/)
![](https://user-images.githubusercontent.com/16874139/97820478-79784f80-1d02-11eb-9e32-caac4563d8f0.png)
### bracketed links
**tags:** #extension
**description:** render links surrounded with \[\[brackets]] instead of underlined.
**author:** [arecsu](https://github.com/arecsu/)
![](https://user-images.githubusercontent.com/16874139/97820501-9f9def80-1d02-11eb-8ad8-b1ddf1ed9599.png)
### bypass preview
**tags:** #extension
**description:** go straight to the normal full view when opening a page.
**author:** [dragonwocky](https://github.com/dragonwocky/)
### calendar scroll
**tags:** #extension
**description:** add a button to scroll down to the current week in fullpage/infinite-scroll calendars.
**author:** [dragonwocky](https://github.com/dragonwocky/)
![](https://user-images.githubusercontent.com/16874139/97820611-fe636900-1d02-11eb-8f78-0536103e25aa.png)
### cherry cola
**tags:** #theme #dark
**description:** a delightfully plummy, cherry cola flavored theme.
**author:** [runargs](https://github.com/runargs)
![](https://user-images.githubusercontent.com/16874139/97819898-9fe8bb80-1cff-11eb-846f-1a66e0302ebd.png)
### custom inserts
**tags:** #extension
**description:** link files for small client-side tweaks. (not sure how to do something? check out the
[tweaks](https://github.com/notion-enhancer/tweaks) collection.)
**author:** [dragonwocky](https://github.com/dragonwocky/)
| option | type |
| --------------------- | ---- |
| css insert | file |
| client-side js insert | file |
### dark+
**tags:** #theme #dark
**description:** a vivid-colour near-black theme.
**author:** [dragonwocky](https://github.com/dragonwocky/)
| option | type | values/defaults |
| -------------- | ----- | ------------------ |
| primary colour | color | `rgb(177, 24, 24)` |
![](https://user-images.githubusercontent.com/16874139/97820632-19ce7400-1d03-11eb-85a9-87f6d957dc96.png)
### dracula
**tags:** #theme #dark
**description:** a theme based on the popular dracula color palette originally by zeno rocha and friends.
**author:** [dracula](https://github.com/dracula/)
![](https://user-images.githubusercontent.com/16874139/97820175-04f0e100-1d01-11eb-9ede-b6e033a28cbc.png)
### emoji sets
**tags:** #extension
**description:** pick from a variety of emoji styles to use.
**author:** [dragonwocky](https://github.com/dragonwocky/)
| option | type | values/defaults |
| ------ | ------ | --------------------------------------------------------------------------------------------------------------- |
| style | select | twitter, apple, google, microsoft, samsung, whatsapp, facebook, joypixels, openmoji, emojidex, lg, htc, mozilla |
![](https://user-images.githubusercontent.com/16874139/97820652-3f5b7d80-1d03-11eb-80a6-34089b946711.png)
### focus mode
**tags:** #extension
**description:** hide the titlebar/menubar if the sidebar is closed (will be shown on hover).
**author:** [arecsu](https://github.com/arecsu/)
| option | extended description | type | values/defaults |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | --------------- |
| add padding to bottom of the page | will only take effect when the sidebar is hidden. aims to make the canvas as symmetrical/consistent as possible: if there is empty space on 3 sides, the 4th should follow. | toggle | on |
![](https://user-images.githubusercontent.com/16874139/97820337-da535800-1d01-11eb-9df5-55567cba2cc4.png)
### font chooser
**tags:** #extension
**description:** customize fonts. for each option, type in the name of
the font you would like to use, or leave it blank to not change anything.
**author:** [torchatlas](https://github.com/torchatlas)
| option | type |
| -------------------- | ---------- |
| sans-serif (inc. ui) | text input |
| serif | text input |
| monospace | text input |
| code | text input |
![](https://user-images.githubusercontent.com/16874139/97820678-61ed9680-1d03-11eb-8f9f-54c1c5faf25e.png)
### gameish
**tags:** #theme #dark
**description:** a purple, "gamer-styled" theme with a blocky-font.
**author:** [LVL100ShrekCultist](https://reddit.com/user/LVL100ShrekCultist/)
![](https://user-images.githubusercontent.com/16874139/97820696-75006680-1d03-11eb-8046-c3cb871ad34c.png)
### littlepig dark
**tags:** #theme #dark
**description:** a purple monospaced theme using emojis and colourful text.
**author:** [Lizishan](https://www.reddit.com/user/Lizishan/)
![](https://user-images.githubusercontent.com/16874139/97820718-919c9e80-1d03-11eb-9749-e04faef82e2d.png)
### littlepig light
**tags:** #theme #light
**description:** a bright monospaced theme using emojis and colourful text.
**author:** [Lizishan](https://www.reddit.com/user/Lizishan/)
![](https://user-images.githubusercontent.com/16874139/97820868-446cfc80-1d04-11eb-80ba-48cbedd62ed1.png)
### material ocean
**tags:** #theme #dark
**description:** an oceanic colour palette.
**author:** [blacksuan19](https://github.com/blacksuan19)
![](https://user-images.githubusercontent.com/16874139/97820253-6d3fc280-1d01-11eb-86d1-9932b364bad8.png)
### neutral
**tags:** #theme #dark
**description:** smoother colours and fonts, designed to be more pleasing to the eye.
**author:** [arecsu](https://github.com/arecsu/)
![](https://user-images.githubusercontent.com/16874139/97821029-fad0e180-1d04-11eb-9bad-2c76e9fa7613.png)
### night shift
**tags:** #extension #theme
**description:** sync dark/light theme with the system (overrides normal theme setting).
**author:** [dragonwocky](https://github.com/dragonwocky/)
### pastel dark
**tags:** #theme #dark
**description:** a true dark theme with a hint of pastel.
**author:** [zenith_illinois](https://reddit.com/user/zenith_illinois/)
![](https://user-images.githubusercontent.com/16874139/97820893-60709e00-1d04-11eb-8d52-55ab44000786.png)
### property layout
**tags:** #extension
**description:** auto-collapse page properties that usually push down page content.
**author:** [alexander-kazakov](https://github.com/alexander-kazakov/)
![](https://user-images.githubusercontent.com/16874139/97820916-81d18a00-1d04-11eb-8e07-b7519590157a.png)
### right-to-left
**tags:** #extension
**description:** enables auto rtl/ltr text direction detection.
**author:** [obahareth](https://github.com/obahareth/)
![](https://user-images.githubusercontent.com/16874139/97820953-a7f72a00-1d04-11eb-98c0-6ad83d097682.png)
### scroll to top
**tags:** #extension
**description:** add an arrow above the help button to scroll back to the top of a page.
**author:** [CloudHill](https://github.com/CloudHill/)
| option | type | values/defaults |
| --------------------------------------- | ------------ | --------------- |
| smooth scrolling | toggle | on |
| distance scrolled until button is shown | number input | 50 |
| unit to measure distance with | select | percent, pixels |
![](https://user-images.githubusercontent.com/16874139/97820445-4c2ba180-1d02-11eb-9d1a-911bca266f7f.png)
### weekly view
**tags:** #extension
**description:** calendar views named "weekly" will show only the 7 days of this week.
**author:** [adihd](https://github.com/adihd/)
![](https://user-images.githubusercontent.com/16874139/97820985-bf361780-1d04-11eb-9e2a-786a7c37477d.png)
### word counter
**tags:** #extension
**description:** add page details: word/character/sentence/block count & speaking/reading times.
**author:** [dragonwocky](https://github.com/dragonwocky/)
![](https://user-images.githubusercontent.com/16874139/97821003-d37a1480-1d04-11eb-8aaa-9e5dfea495eb.png)
## contributors
[@TarasokUA](https://github.com/TarasokUA/) wrote the first versions of this in python, in early 2020.
a couple months after I ([@dragonwocky](https://github.com/dragonwocky/)) picked the project up, at first extending
upon the original base and later moving to the javascript module system.
the enhancer wouldn't be anything near to what it is now though without
interested community members testing, coding and ideating features - some are listed as
[contributors](https://github.com/notion-enhancer/notion-enhancer/graphs/contributors) here on github,
but many more have been helping out on discord and in emails.
individual modules have their original authors attributed.
[read the docs online](https://notion-enhancer.github.io/)

View File

@ -1,55 +0,0 @@
# updating
the enhancer is still a young project, so it's growing quickly. this means a lot of stuff is changing internally
\- and, sometimes, externally.
previously (<= v0.7.0), the enhancer was a python script with a couple of resource files, and if you
wanted to customise things you had to go in and edit those files. in v0.8.0 there has been a complete
rewrite and overhaul: now this is a program that makes use of a number of modules and a graphical menu.
## installation dependencies
previously, python and the node.js `asar` package both had to be manually installed.
node.js is the only current requirement of the enhancer.
- python is no longer a dependency: keep it, get rid of it - up to you.
- the package installs asar itself in a more scoped environment: if you're confident with
the command line, you can remove the package with `npm remove -g asar`. otherwise, it
won't do any damage to just leave it.
## keeping the files
enhancement is done fully from the command prompt.
by default, there are no files for you to worry about.
you can delete the folder the old version of the enhancer is kept in.
(though you may want to keep the `user.css` file: see below.)
## user.css styling
when you first load the enhancer, there's no single file you can edit to see instant changes.
instead, the "custom inserts" module is used: you can use it to pick any javascript or css file anywhere
on your computer and include it every time you load up notion.
to make your own css file, make sure that your file manager has "show file extensions" ticked, then
create a text document and make sure the name ends in `.css` (e.g. `notion-tweaks.css`). or, just use
the old `user.css` from before the update.
most of the same css snippets will work, but some (e.g. preview page width) have been moved to the new variable
system, plus new ones have been found. it's a good idea to check what you have against the [tweaks](https://github.com/notion-enhancer/tweaks)
page and the [css theming documentation](DOCUMENTATION.md#variable-theming).
## configuration
"what happened to the tray options?"
"how can I set a custom window visibility toggle hotkey?"
these options and more have been moved to the graphical menu, which can be opened from the
tray or with `ALT+E` (while the notion app is focused).
## installing
just follow the normal [installation steps](README.md#installation) (starting from step 2, you should
already have node.js installed). don't worry about running `cleaner.py`, the new version will detect and overwrite
the old for you.

74
bin.js
View File

@ -1,74 +0,0 @@
#!/usr/bin/env node
/*
* notion-enhancer
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (https://dragonwocky.me/notion-enhancer) under the MIT license
*/
'use strict';
const cli = require('cac')('notion-enhancer'),
{ EnhancerError } = require('./pkg/helpers.js');
// === title ===
// ...information
// * warning
// > prompt
// -- response
// ~~ exit
// ### error ###
cli.option('-y, --yes', ': skip prompts (may overwrite data)');
cli.option('-n, --no', ': skip prompts (may cause failures)');
cli.option('-d, --dev', ': show detailed error messages (for debug purposes)');
cli
.command('apply', ': add the enhancer to the notion app')
.action(async (options) => {
console.info('=== NOTION ENHANCEMENT LOG ===');
await require('./pkg/apply.js')({
overwrite_version: options.yes ? 'y' : options.no ? 'n' : undefined,
friendly_errors: !options.dev,
});
console.info('=== END OF LOG ===');
});
cli
.command('remove', ': return notion to its pre-enhanced/pre-modded state')
.action(async (options) => {
console.info('=== NOTION RESTORATION LOG ===');
await require('./pkg/remove.js')({
delete_data: options.yes ? 'y' : options.no ? 'n' : undefined,
friendly_errors: !options.dev,
});
console.info('=== END OF LOG ===');
});
cli
.command('check', ': check the current state of the notion app')
.action(async (options) => {
try {
const status = await require('./pkg/check.js')();
console.info(options.dev ? status : status.msg);
} catch (err) {
console.error(
err instanceof EnhancerError && !options.dev ? err.message : err
);
}
});
let helpCalled = false;
cli.globalCommand.option('-h, --help', ': display usage information');
cli.globalCommand.helpCallback = (sections) => {
sections[0].body += '\nhttps://github.com/notion-enhancer/notion-enhancer';
helpCalled = true;
};
cli.showHelpOnExit = true;
cli.globalCommand.option('-v, --version', ': display version number');
cli.globalCommand.versionNumber = require('./package.json').version;
cli.showVersionOnExit = true;
cli.parse();
if (!cli.matchedCommand && !helpCalled && !cli.options.version)
cli.outputHelp();

331
bin.mjs Executable file
View File

@ -0,0 +1,331 @@
#!/usr/bin/env node
/**
* notion-enhancer
* (c) 2023 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (https://notion-enhancer.github.io/) under the MIT license
*/
import os from "node:os";
import { createRequire } from "node:module";
import chalk from "chalk-template";
import arg from "arg";
import {
backupApp,
enhanceApp,
getInsertVersion,
getResourcePath,
restoreApp,
setNotionPath,
} from "./scripts/enhance-desktop-app.mjs";
import { greaterThan } from "./src/core/updateCheck.mjs";
import { existsSync } from "node:fs";
const nodeRequire = createRequire(import.meta.url),
manifest = nodeRequire("./package.json");
let __quiet, __debug;
const print = (...args) => __quiet || process.stdout.write(chalk(...args)),
printObject = (value) => __quiet || console.dir(value, { depth: null }),
clearLine = `\r\x1b[K`,
showCursor = `\x1b[?25h`,
hideCursor = `\x1b[?25l`,
cursorUp = (n) => `\x1b[${n}A`,
cursorForward = (n) => `\x1b[${n}C`;
let __confirmation;
const readStdin = () => {
return new Promise((res) => {
process.stdin.resume();
process.stdin.setEncoding("utf8");
process.stdin.once("data", (key) => {
process.stdin.pause();
res(key);
});
});
},
promptConfirmation = async (prompt) => {
let input;
const validInputs = ["Y", "y", "N", "n"],
promptLength = ` > ${prompt} [Y/n]: `.length;
// prevent line clear remove existing stdout
print`\n`;
do {
// clear line and repeat prompt until valid input is received
print`${cursorUp(1)}${clearLine} {inverse > ${prompt} [Y/n]:} `;
// autofill prompt response if --yes, --no or --quiet flags passed
if (validInputs.includes(__confirmation)) {
input = __confirmation;
print`${__confirmation}\n`;
} else input = (await readStdin()).trim();
if (!input) {
// default to Y if enter is pressed w/out input
input = "Y";
print`${cursorUp(1)}${cursorForward(promptLength)}Y\n`;
}
} while (!validInputs.includes(input));
// move cursor to immediately after input
print`${cursorUp(1)}${cursorForward(promptLength + 1)}`;
return input;
};
let __spinner;
const spinnerFrames = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"],
stopSpinner = () => {
if (!__spinner) return;
clearInterval(__spinner);
// show cursor and overwrite spinner with arrow on completion
print`\b{bold.yellow →}\n${showCursor}`;
__spinner = undefined;
},
startSpinner = () => {
// cleanup prev spinner if necessary
stopSpinner();
// hide cursor and print first frame
print`${hideCursor}{bold.yellow ${spinnerFrames[0]}}`;
let i = 0;
__spinner = setInterval(() => {
i++;
// overwrite spinner with next frame
print`\b{bold.yellow ${spinnerFrames[i % spinnerFrames.length]}}`;
}, 80);
};
const compileOptsToArgSpec = (options) => {
const args = {};
for (const [opt, [type]] of options) {
const aliases = opt.split(", ").map((alias) => alias.split("=")[0]),
param = aliases[1] ?? aliases[0];
args[param] = type;
for (let i = 0; i < aliases.length; i++) {
if (aliases[i] === param) continue;
args[aliases[i]] = param;
}
}
return args;
},
compileOptsToJsonOutput = (options) => {
// the structure used to define options above
// is convenient and compact, but requires additional
// parsing to understand. this function processes
// options into a more explicitly defined structure
return options.map(([opt, [type, description]]) => {
const option = {
aliases: opt.split(", ").map((alias) => alias.split("=")[0]),
type,
description,
},
example = opt
.split(", ")
.map((alias) => alias.split("=")[1])
.find((value) => value);
if (example) option.example = example;
return option;
});
};
let __json;
const printHelp = (commands, options) => {
const { name, version, homepage } = manifest,
usage = `${name} <command> [options]`;
if (__json) {
printObject({
name,
version,
homepage,
usage,
commands: Object.fromEntries(commands),
options: compileOptsToJsonOutput(options),
});
} else {
const cmdPad = Math.max(...commands.map(([cmd]) => cmd.length)),
optPad = Math.max(...options.map((opt) => opt[0].length)),
parseCmd = (cmd) =>
chalk` ${cmd[0].padEnd(cmdPad)} {grey :} ${cmd[1]}`,
parseOpt = (opt) =>
chalk` ${opt[0].padEnd(optPad)} {grey :} ${opt[1][1]}`;
print`{bold.whiteBright.underline ${name} v${version}}\n{grey ${homepage}}
\n{bold.whiteBright USAGE}\n${name} <command> [options]
\n{bold.whiteBright COMMANDS}\n${commands.map(parseCmd).join("\n")}
\n{bold.whiteBright OPTIONS}\n${options.map(parseOpt).join("\n")}\n`;
}
},
printVersion = () => {
if (__json) {
printObject({
[manifest.name]: manifest.version,
node: process.version.slice(1),
platform: process.platform,
architecture: process.arch,
os: os.release(),
});
} else {
const nodeVersion = `node@${process.version}`,
enhancerVersion = `${manifest.name}@v${manifest.version}`,
osVersion = `${process.platform}-${process.arch}/${os.release()}`;
print`${enhancerVersion} via ${nodeVersion} on ${osVersion}\n`;
}
};
try {
const commands = [
// ["command", "description"]
["apply", "Inject the notion-enhancer into Notion desktop."],
["remove", "Restore Notion desktop to its pre-enhanced state."],
["check", "Report Notion desktop's enhancement state."],
],
// prettier-ignore
options = [
// ["alias, option=example", [type, "description"]]
["--path=</path/to/notion/resources>", [String, "Manually provide a Notion installation location."]],
["--no-backup", [Boolean, "Skip backup; enhancement will be irreversible."]],
["--json", [Boolean, "Output JSON from the `check` and `--version` commands."]],
["-y, --yes", [Boolean, 'Skip prompts; assume "yes" and run non-interactively.']],
["-n, --no", [Boolean, 'Skip prompts; assume "no" and run non-interactively.']],
["-q, --quiet", [Boolean, 'Skip prompts; assume "no" unless -y and hide all output.']],
["-d, --debug", [Boolean, "Show detailed error messages and keep extracted files."]],
["-h, --help", [Boolean, "Display usage information for this CLI."]],
["-v, --version", [Boolean, "Display this CLI's version number."]],
];
const args = arg(compileOptsToArgSpec(options));
if (args["--debug"]) __debug = true;
if (args["--quiet"]) __quiet = true;
if (args["--json"]) __json = true;
if (args["--no"] || args["--quiet"]) __confirmation = "n";
if (args["--yes"]) __confirmation = "y";
if (args["--help"]) printHelp(commands, options), process.exit();
if (args["--version"]) printVersion(), process.exit();
if (args["--path"]) setNotionPath(args["--path"]);
const appPath = getResourcePath("app.asar"),
backupPath = getResourcePath("app.asar.bak"),
insertVersion = await getInsertVersion(),
updateAvailable = greaterThan(manifest.version, insertVersion);
const messages = {
"notion-found": insertVersion
? // prettier-ignore
`Notion desktop found with ${manifest.name} v${insertVersion
} applied${updateAvailable ? "" : " (up to date)"}.`
: `Notion desktop found (no enhancements applied).`,
"notion-not-found": `Notion desktop not found.`,
// prettier-ignore
"update-available": chalk`v${manifest.version
} is available! To apply, run {underline ${manifest.name} apply -y}.`,
// prettier-ignore
"update-confirm": `${updateAvailable ? "Upgrade" : "Downgrade"
} to ${manifest.name}${manifest.name} v${manifest.version}?`,
"backup-found": `Restoring to pre-enhanced state from backup...`,
"backup-not-found": chalk`No backup found: to restore Notion desktop to its pre-enhanced state,
uninstall it and reinstall Notion from {underline https://www.notion.so/desktop}.`,
"backup-app": `Backing up app before enhancement...`,
"enhance-app": `Enhancing and patching app sources...`,
};
const SUCCESS = chalk`{bold.whiteBright SUCCESS} {green ✔}`,
FAILURE = chalk`{bold.whiteBright FAILURE} {red ✘}`,
CANCELLED = chalk`{bold.whiteBright CANCELLED} {red ✘}`,
INCOMPLETE = Symbol();
const interactiveRestore = async () => {
if (!backupPath || !existsSync(backupPath)) {
print` {red * ${messages["backup-not-found"]}}\n`;
return FAILURE;
}
print` {grey * ${messages["backup-found"]}} `;
startSpinner();
await restoreApp();
stopSpinner();
return SUCCESS;
};
const getNotion = () => {
if (!appPath || !existsSync(appPath)) {
print` {red * ${messages["notion-not-found"]}}\n`;
return FAILURE;
} else {
print` {grey * ${messages["notion-found"]}}\n`;
return INCOMPLETE;
}
},
compareVersions = async () => {
if (!insertVersion) return INCOMPLETE;
// same version already applied
if (insertVersion === manifest.version) return SUCCESS;
// diff version already applied
print` {grey * ${messages["notion-found"]}}\n`;
const replace = await promptConfirmation(messages["update-confirm"]);
print`\n`;
return ["Y", "y"].includes(replace)
? (await interactiveRestore()) === SUCCESS
? INCOMPLETE
: FAILURE
: CANCELLED;
},
interactiveEnhance = async () => {
if (!args["--no-backup"]) {
print` {grey * ${messages["backup-app"]}} `;
startSpinner();
await backupApp();
stopSpinner();
}
print` {grey * ${messages["enhance-app"]}} `;
startSpinner();
await enhanceApp(__debug);
stopSpinner();
return SUCCESS;
};
switch (args["_"][0]) {
case "apply": {
print`{bold.whiteBright [${manifest.name.toUpperCase()}] APPLY}\n`;
let res = getNotion();
if (res === INCOMPLETE) res = await compareVersions();
if (res === INCOMPLETE) res = await interactiveEnhance();
print`${res}\n`;
break;
}
case "remove": {
print`{bold.whiteBright [${manifest.name.toUpperCase()}] REMOVE}\n`;
let res = getNotion();
if (res === INCOMPLETE) {
res = insertVersion ? await interactiveRestore() : SUCCESS;
}
print`${res}\n`;
break;
}
case "check": {
if (__json) {
const cliVersion = manifest.version,
state = { appPath, backupPath, insertVersion, cliVersion };
if (appPath && !existsSync(appPath)) state.appPath = null;
if (backupPath && !existsSync(backupPath)) state.backupPath = null;
printObject(state), process.exit();
}
print`{bold.whiteBright [${manifest.name.toUpperCase()}] CHECK}\n`;
let res = getNotion();
if (res === INCOMPLETE && updateAvailable) {
print` {grey * ${messages["update-available"]}}\n`;
}
break;
}
default:
printHelp(commands, options);
}
} catch (err) {
stopSpinner();
const message = err.message.split("\n")[0];
if (__debug) {
print`{bold.red ${err.name}:} ${message}\n{grey ${err.stack
.split("\n")
.splice(1)
.map((at) => at.replace(/\s{4}/g, " "))
.join("\n")}}`;
} else {
print`{bold.red Error:} ${message} {grey (Run with -d for more information.)}\n`;
}
}

View File

@ -1,43 +0,0 @@
/*
* truncated table titles
* (c) 2020 admiraldus (https://github.com/admiraldus)
* under the MIT license
*/
/* target tooltip */
.admiraldus-truncated-table-titles-tooltip
{
position: fixed;
}
.admiraldus-truncated-table-titles-tooltip > div {
display: flex;
align-items: center;
border-radius: 3px;
background: var(--theme--card);
padding: 4px 8px;
box-shadow: var(--theme--box-shadow);
}
/* target tooltip icon */
.admiraldus-truncated-table-titles-tooltip-svg {
display: flex;
align-items: center;
}
.admiraldus-truncated-table-titles-tooltip-svg > svg {
margin-right: 0.25em;
height: 1em;
width: 1em;
fill: var(--theme--text_ui_info);
}
/* target tooltip text */
.admiraldus-truncated-table-titles-tooltip-text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 12px;
font-weight: 500;
color: var(--theme--text_ui);
}

View File

@ -1,44 +0,0 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 296.639 296.639" style="enable-background:new 0 0 296.639 296.639;" xml:space="preserve">
<g>
<path d="M293.357,138.957c-2.621-3.28-65.112-80.336-145.038-80.336c-79.927,0-142.417,77.056-145.038,80.336
c-4.375,5.476-4.375,13.251,0,18.727c2.621,3.28,65.111,80.335,145.038,80.335c79.926,0,142.417-77.055,145.038-80.334
C297.732,152.207,297.732,144.432,293.357,138.957z M148.319,208.018c-50.516,0-95.235-40.82-113.213-59.698
c17.985-18.886,62.701-59.699,113.213-59.699c50.511,0,95.227,40.812,113.212,59.699
C243.546,167.206,198.83,208.018,148.319,208.018z"/>
<circle cx="146.955" cy="148.319" r="42.948"/>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1,207 +0,0 @@
/*
* truncated table titles
* (c) 2020 admiraldus (https://github.com/admiraldus)
* under the MIT license
*/
'use strict';
const PATH = require('path');
const FS = require('fs-extra');
module.exports = {
id: '1794c0bd-7b96-46ad-aa0b-fc4bd76fc7fb',
name: 'truncated table titles',
tags: ['extension', 'admiraldus'],
desc: 'see the full text of the truncated table titles on hover over.',
version: '0.1.0',
author: {
name: 'admiraldus',
link: 'https://github.com/admiraldus',
avatar: 'enhancement://admiraldus-cosmos/img/avatar.jpg',
},
hacks: {
'renderer/preload.js'(store, __exports) {
document.addEventListener('readystatechange', () => {
if (document.readyState !== 'complete') return false;
/**
* Wait until frame exists to avoid "cannot read property" error.
*/
function wait() {
const frame = document.querySelector('.notion-frame');
if (frame !== null) {
(async () => {
const notionOverlayContainer = document.querySelector('.notion-overlay-container');
const createSvgContainer = document.createElement('div');
const svgContainerHtml = await FS.readFile(PATH.resolve(`${__dirname}/icons/eye.svg`));
createSvgContainer.innerHTML = svgContainerHtml;
createSvgContainer.setAttribute('style', 'display: none;');
createSvgContainer.classList.add('admiraldus-truncated-table-titles-rendered-svg');
notionOverlayContainer.append(createSvgContainer);
})();
} else {
setTimeout(wait, 500);
}
}
wait();
/**
* Set the offset values of the created tooltip.
*
* @param {HTMLDivElement} cell Target the table header cell.
* @param {HTMLDivElement} tooltip Target the created tooltip.
*
* @return {string} Return the offset values.
*/
function setTooltipOffset(cell, tooltip) {
const body = document.querySelector('body');
const sidebar = document.querySelector('.notion-sidebar:not([style*="transform"])');
Object.defineProperty(Object.prototype, 'offset', {
get: function() {
return {
left: this.getBoundingClientRect().left + window.scrollX,
top: this.getBoundingClientRect().top + window.scrollY,
};
},
configurable: true,
});
if (body.offsetWidth < tooltip.offsetWidth + cell.offset.left) {
if (body.offsetWidth > cell.offsetWidth + cell.offset.left) {
const horizontalOffset = `right: ${body.offsetWidth - cell.offsetWidth - cell.offset.left}px;`;
return `top: ${cell.offset.top + 40}px; ${horizontalOffset}`;
} else {
const horizontalOffset = 'right: 8px;';
return `top: ${cell.offset.top + 40}px; ${horizontalOffset}`;
}
} else if (sidebar == null && cell.offset.left <= 0) {
const horizontalOffset = 'left: 8px;';
return `top: ${cell.offset.top + 40}px; ${horizontalOffset}`;
} else if (sidebar !== null && sidebar.offsetWidth >= cell.offset.left) {
const horizontalOffset = `left: ${sidebar.offsetWidth + 8}px;`;
console.warn('4');
return `top: ${cell.offset.top + 40}px; ${horizontalOffset}`;
} else {
const horizontalOffset = `left: ${cell.offset.left}px;`;
return `top: ${cell.offset.top + 40}px;${horizontalOffset}`;
}
}
/**
* Create and append tooltip HTML.
*
* @param {HTMLDivElement} cell Target the table header cell.
* @param {string} text Get the title of the table header cell.
* @param {string} icon Get the HTML of the rendered svg.
*/
function createTooltip(cell, text, icon) {
const frame = document.querySelector('.notion-frame');
const notionOverlayContainer = document.querySelector('.notion-overlay-container');
const createTooltipContainer = document.createElement('div');
const tooltipText = text.innerText;
const tooltipIcon = icon;
const tooltipContainerHtml =
`<div>
<div class="admiraldus-truncated-table-titles-tooltip-svg">
${tooltipIcon}
</div>
<div class="admiraldus-truncated-table-titles-tooltip-text">
${tooltipText}
</div>
</div>`;
createTooltipContainer.innerHTML = tooltipContainerHtml;
createTooltipContainer.classList.add('admiraldus-truncated-table-titles-tooltip');
createTooltipContainer.setAttribute('style', `max-width: ${cell.offsetWidth >= 450 ? cell.offsetWidth / 2 + 450 >= frame.offsetWidth ? frame.offsetWidth - 16 : cell.offsetWidth / 2 + 450 : 450}px;`);
notionOverlayContainer.append(createTooltipContainer);
const tooltipOffset = setTooltipOffset(cell, document.querySelector('.admiraldus-truncated-table-titles-tooltip'));
createTooltipContainer.setAttribute('style', createTooltipContainer.getAttribute('style') + tooltipOffset);
}
/**
* Remove all tooltips from the DOM.
*/
function removeTooltip() {
if (document.querySelector('.admiraldus-truncated-table-titles-tooltip')) {
while (document.querySelectorAll('.admiraldus-truncated-table-titles-tooltip').length !== 0) {
document.querySelectorAll('.admiraldus-truncated-table-titles-tooltip').forEach((tooltip) => tooltip.remove());
}
}
}
const BODY = document.querySelector('body');
let tooltipDelay = null;
BODY.addEventListener('mousedown', () => {
/**
* When the drag is detected, set the global variable to true and remove all tooltips.
*/
const dragStart = function() {
window.isCellDragging = true;
window.clearTimeout(tooltipDelay);
removeTooltip();
};
/**
* When the drag is over, set the global variable to false and remove the relevant event listeners.
*/
const dragEnd = function() {
window.isCellDragging = false;
window.removeEventListener('mousemove', dragStart);
window.removeEventListener('mouseup', dragEnd);
};
window.addEventListener('mousemove', dragStart);
window.addEventListener('mouseup', dragEnd);
});
BODY.addEventListener('mouseenter', (event) => {
const el = event.target;
if (window.isCellDragging !== true) {
if (el.classList.contains('notion-table-view-header-cell')) {
if (el.querySelector('div[style*="text-overflow"]').scrollWidth > el.querySelector('div[style*="text-overflow"]').clientWidth) {
tooltipDelay = window.setTimeout(function() {
createTooltip(el, el.querySelector('div[style*="text-overflow"]'), document.querySelector('.admiraldus-truncated-table-titles-rendered-svg').innerHTML);
}, 1000);
}
}
}
}, true);
BODY.addEventListener('mouseleave', (event) => {
const el = event.target;
if (el.classList.contains('notion-table-view-header-cell')) {
if (el.querySelector('div[style*="text-overflow"]').scrollWidth > el.querySelector('div[style*="text-overflow"]').clientWidth) {
window.clearTimeout(tooltipDelay);
removeTooltip();
}
}
}, true);
console.info(
'%cextension: ' +
`%c${module.exports.name} ` +
`%cfrom ${module.exports.author.name} ` +
'%c(operational)', 'font-weight: bold;',
'font-weight: normal',
'font-style: italic;',
'color: #a5d6a7;');
});
},
},
};

View File

@ -1,20 +0,0 @@
/*
* always on top
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* under the MIT license
*/
'use strict';
// this is just a pseudo mod to "separate" the button
// from the core module - the core still handles actually
// making it work.
module.exports = {
id: '72886371-dada-49a7-9afc-9f275ecf29d3',
tags: ['extension'],
name: 'always on top',
desc:
"add an arrow/button to show the notion window on top of other windows even if it's not focused.",
version: '0.1.1',
author: 'dragonwocky',
};

View File

@ -1,24 +0,0 @@
/*
* bracketed links
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 Arecsu
* under the MIT license
*/
.notion-link-token span {
border-bottom: none !important;
}
.notion-link-token:before {
content: '[[';
opacity: 0.7;
transition: opacity 100ms ease-in;
}
.notion-link-token:after {
content: ']]';
opacity: 0.7;
transition: opacity 100ms ease-in;
}
.notion-link-token:hover::before,
.notion-link-token:hover::after {
opacity: 1;
}

View File

@ -1,16 +0,0 @@
/*
* bracketed links
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* under the MIT license
*/
'use strict';
module.exports = {
id: '60e14feb-a81d-4ffb-9b12-7585d346bad8',
tags: ['extension'],
name: 'bracketed links',
desc: 'render links surrounded with [[brackets]] instead of __underlined__.',
version: '0.1.0',
author: 'arecsu',
};

View File

@ -1,9 +0,0 @@
/*
* bypass preview
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* under the MIT license
*/
.notion-peek-renderer {
display: none;
}

View File

@ -1,55 +0,0 @@
/*
* bypass preview
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* under the MIT license
*/
'use strict';
module.exports = {
id: 'cb6fd684-f113-4a7a-9423-8f0f0cff069f',
tags: ['extension'],
name: 'bypass preview',
desc: 'go straight to the normal full view when opening a page.',
version: '0.1.2',
author: 'dragonwocky',
hacks: {
'renderer/preload.js'(store, __exports) {
document.addEventListener('readystatechange', (event) => {
if (document.readyState !== 'complete') return false;
let queue = [];
const observer = new MutationObserver((list, observer) => {
if (!queue.length) requestIdleCallback(() => handle(queue));
queue.push(...list);
});
observer.observe(document.body, {
childList: true,
subtree: true,
attributes: true,
});
let lastPageID;
function handle(list) {
queue = [];
const pageID = (location.search
.slice(1)
.split('&')
.map((opt) => opt.split('='))
.find((opt) => opt[0] === 'p') || [
'',
...location.pathname.split(/(-|\/)/g).reverse(),
])[1],
preview = document.querySelector(
'.notion-peek-renderer [style*="height: 45px;"] a'
);
if (!pageID) return;
if (preview) {
if (pageID === lastPageID) {
history.back();
} else preview.click();
} else lastPageID = pageID;
}
});
},
},
};

View File

@ -1,21 +0,0 @@
/*
* calendar scroll
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* under the MIT license
*/
#calendar-scroll-to-week {
background: var(--theme--interactive_hover);
border: 1px solid transparent;
font-size: var(--theme--font_label-size);
color: var(--theme--text);
height: 24px;
border-radius: 3px;
line-height: 1.2;
padding: 0 0.5em;
margin-right: 5px;
}
#calendar-scroll-to-week:hover {
background: transparent;
border: 1px solid var(--theme--interactive_hover);
}

View File

@ -1,79 +0,0 @@
/*
* calendar scroll
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* under the MIT license
*/
'use strict';
const { createElement } = require('../../pkg/helpers.js');
module.exports = {
id: 'b1c7db33-dfee-489a-a76c-0dd66f7ed29a',
tags: ['extension'],
name: 'calendar scroll',
desc:
'add a button to scroll down to the current week in fullpage/infinite-scroll calendars.',
version: '0.1.1',
author: 'dragonwocky',
hacks: {
'renderer/preload.js'(store, __exports) {
document.addEventListener('readystatechange', (event) => {
if (document.readyState !== 'complete') return false;
const attempt_interval = setInterval(enhance, 500);
function enhance() {
const notion_elem = document.querySelector('.notion-frame');
if (!notion_elem) return;
clearInterval(attempt_interval);
const button = createElement(
'<button id="calendar-scroll-to-week">Scroll</button>'
);
button.addEventListener('click', (event) => {
const collection_view = document.querySelector(
'.notion-collection-view-select'
);
if (!collection_view) return;
const day = [
...collection_view.parentElement.parentElement.parentElement.parentElement.getElementsByClassName(
'notion-calendar-view-day'
),
].find((day) => day.style.background);
if (!day) return;
const scroller = document.querySelector(
'.notion-frame .notion-scroller'
);
scroller.scroll({
top: day.offsetParent.offsetParent.offsetTop + 70,
});
setTimeout(
() =>
scroller.scroll({
top: day.offsetParent.offsetParent.offsetTop + 70,
}),
100
);
});
handle();
const observer = new MutationObserver(handle);
observer.observe(notion_elem, {
childList: true,
subtree: true,
});
function handle(list, observer) {
if (document.querySelector('#calendar-scroll-to-week')) return;
const arrow = document.querySelector(
'.notion-selectable.notion-collection_view_page-block .chevronLeft'
);
if (arrow)
arrow.parentElement.parentElement.insertBefore(
button,
arrow.parentElement
);
}
}
});
},
},
};

View File

@ -1,12 +0,0 @@
/*
* cherry cola
* (c) 2020 Alexa Baldon (https://github.com/runargs)
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* under the MIT license
*/
/* quotations as serif */
.notion-dark-theme .notion-quote-block {
font-family: Georgia, 'Times New Roman', Times, serif;
background-color: var(--cola-sec);
}

View File

@ -1,16 +0,0 @@
/*
* cherry cola
* (c) 2020 Alexa Baldon (https://github.com/runargs)
* under the MIT license
*/
'use strict';
module.exports = {
id: 'ec5c4640-68d4-4d25-aefd-62c7e9737cfb',
tags: ['theme', 'dark'],
name: 'cherry cola',
desc: 'a delightfully plummy, cherry cola flavored theme.',
version: '0.1.0',
author: 'runargs',
};

View File

@ -1,144 +0,0 @@
/*
* cherry cola
* (c) 2020 Alexa Baldon (https://github.com/runargs)
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* under the MIT license
*/
:root {
--cola-main: #180915;
--cola-sec: #1d0919;
--cola-tet: #492341;
--cola-info: #9b6890;
--cola-accent: #bf799b;
--cola-gray: #8a8a8a;
--cola-brown: #755241;
--cola-orange: #e6846b;
--cola-yellow: #d7b56e;
--cola-green: #8f9b4f;
--cola-blue: #6ebdb7;
--cola-purple: #813d63;
--cola-pink: #d86f71;
--cola-red: #a33232;
/* main */
--theme_dark--main: var(--cola-main);
--theme_dark--sidebar: var(--cola-sec);
--theme_dark--overlay: rgba(29, 9, 25, 0.5);
--theme_dark--dragarea: #210a1c;
--theme_dark--box-shadow: rgba(20, 0, 16, 0.2) 0px 0px 0px 1px,
rgba(20, 0, 16, 0.2) 0px 2px 4px;
--theme_dark--box-shadow_strong: rgba(20, 0, 16, 0.1) 0px 0px 0px 1px,
rgba(20, 0, 16, 0.2) 0px 3px 6px, rgba(20, 0, 16, 0.4) 0px 9px 24px;
/* scrollbar */
--theme_dark--scrollbar: var(--cola-sec);
--theme_dark--scrollbar_hover: var(--cola-accent);
/* database */
--theme_dark--card: var(--cola-sec);
--theme_dark--gallery: var(--cola-sec);
--theme_dark--select_input: var(--cola-tet);
--theme_dark--table-border: var(--cola-tet);
--theme_dark--ui-border: rgba(73, 35, 65, 0.7);
--theme_dark--interactive_hover: var(--cola-tet);
--theme_dark--button_close: var(--cola-accent);
/* select/hover/click */
--theme_dark--selected: rgba(78, 32, 69, 0.5);
--theme_dark--primary: var(--cola-accent);
--theme_dark--primary_hover: var(--cola-accent);
--theme_dark--primary_click: var(--cola-sec);
--theme_dark--primary_indicator: var(--cola-accent);
--theme_dark--option_active-background: var(--theme_dark--primary);
--theme_dark--option_hover-background: var(--theme_dark--primary_hover);
/* danger */
--theme_dark--danger_text: #eb5757;
--theme_dark--danger_border: rgba(235, 87, 87, 0.5);
/* default text colors */
--theme_dark--text: #ffffff;
--theme_dark--text_ui: var(--cola-info);
--theme_dark--text_ui_info: var(--cola-info);
/* text color options */
--theme_dark--text_gray: var(--cola-gray);
--theme_dark--text_brown: var(--cola-brown);
--theme_dark--text_orange: var(--cola-orange);
--theme_dark--text_yellow: var(--cola-yellow);
--theme_dark--text_green: var(--cola-green);
--theme_dark--text_blue: var(--cola-blue);
--theme_dark--text_purple: var(--cola-purple);
--theme_dark--text_pink: var(--cola-pink);
--theme_dark--text_red: var(--cola-red);
--theme_dark--select-text: var(--cola-main);
--theme_dark--select_gray: var(--cola-gray);
--theme_dark--select_brown: var(--cola-brown);
--theme_dark--select_brown-text: #ffffff;
--theme_dark--select_orange: var(--cola-orange);
--theme_dark--select_yellow: var(--cola-yellow);
--theme_dark--select_green: var(--cola-green);
--theme_dark--select_blue: var(--cola-blue);
--theme_dark--select_purple: var(--cola-purple);
--theme_dark--select_purple-text: #ffffff;
--theme_dark--select_pink: var(--cola-pink);
--theme_dark--select_red: var(--cola-red);
--theme_dark--select_red-text: #ffffff;
--theme_dark--line-text: var(--cola-main);
--theme_dark--line_gray: var(--cola-gray);
--theme_dark--line_brown: var(--cola-brown);
--theme_dark--line_orange: var(--cola-orange);
--theme_dark--line_yellow: var(--cola-yellow);
--theme_dark--line_green: var(--cola-green);
--theme_dark--line_blue: var(--cola-blue);
--theme_dark--line_purple: var(--cola-purple);
--theme_dark--line_pink: var(--cola-pink);
--theme_dark--line_red: var(--cola-red);
--theme_dark--bg-text: var(--theme_dark--select-text);
--theme_dark--bg_gray: var(--theme_dark--select_gray);
--theme_dark--bg_brown: var(--theme_dark--select_brown);
--theme_dark--bg_orange: var(--theme_dark--select_orange);
--theme_dark--bg_yellow: var(--theme_dark--select_yellow);
--theme_dark--bg_green: var(--theme_dark--select_green);
--theme_dark--bg_blue: var(--theme_dark--select_blue);
--theme_dark--bg_purple: var(--theme_dark--select_purple);
--theme_dark--bg_pink: var(--theme_dark--select_pink);
--theme_dark--bg_red: var(--theme_dark--select_red);
/* callout blocks */
--theme_dark--callout-text: var(--theme_dark--line-text);
--theme_dark--callout_gray: var(--theme_dark--line_gray);
--theme_dark--callout_brown: var(--theme_dark--line_brown);
--theme_dark--callout_orange: var(--theme_dark--line_orange);
--theme_dark--callout_yellow: var(--theme_dark--line_yellow);
--theme_dark--callout_green: var(--theme_dark--line_green);
--theme_dark--callout_blue: var(--theme_dark--line_blue);
--theme_dark--callout_purple: var(--theme_dark--line_purple);
--theme_dark--callout_pink: var(--theme_dark--line_pink);
--theme_dark--callout_red: var(--theme_dark--line_red);
/* incline/code text */
--theme_dark--code_inline-text: var(--cola-accent);
--theme_dark--code_inline-background: var(--cola-main);
--theme_dark--code-text: var(--theme_dark--text);
--theme_dark--code-background: var(--cola-sec);
--theme_dark--code_function: var(--theme_dark--text_blue);
--theme_dark--code_keyword: var(--theme_dark--text_pink);
--theme_dark--code_tag: var(--theme_dark--text_pink);
--theme_dark--code_operator: var(--theme_dark--text_yellow);
--theme_dark--code_important: var(--theme_dark--text_yellow);
--theme_dark--code_property: var(--theme_dark--text_pink);
--theme_dark--code_builtin: var(--theme_dark--text_yellow);
--theme_dark--code_attr-name: var(--theme_dark--text_yellow);
--theme_dark--code_comment: var(--theme_dark--text_gray);
--theme_dark--code_punctuation: var(--theme_dark--text_gray);
--theme_dark--code_doctype: var(--theme_dark--text_gray);
--theme_dark--code_number: var(--theme_dark--text_purple);
--theme_dark--code_string: var(--theme_dark--text_orange);
--theme_dark--code_attr-value: var(--theme_dark--text_orange);
}

View File

@ -1,24 +0,0 @@
/*
* code line numbers
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 CloudHill
* under the MIT license
*/
.notion-code-block.line-numbers > div {
position: relative;
}
.code-numbered {
padding-left: 48px !important;
}
#code-line-numbers {
font-size: var(--theme--font_code-size) !important;
font-family: var(--theme--font_code) !important;
color: var(--theme--text_ui_info);
text-align: right;
position: absolute;
right: calc(100% - 30px);
overflow: hidden;
pointer-events: none;
}

View File

@ -1,121 +0,0 @@
/*
* code line numbers
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 CloudHill
* under the MIT license
*/
'use strict';
const { createElement } = require('../../pkg/helpers.js');
module.exports = {
id: 'd61dc8a7-b195-465b-935f-53eea9efe74e',
tags: ['extension'],
name: 'code line numbers',
desc: 'adds line numbers to code blocks.',
version: '1.1.0',
author: 'CloudHill',
options: [
{
key: 'single_lined',
label: 'show line numbers on single-lined code blocks',
type: 'toggle',
value: false,
},
],
hacks: {
'renderer/preload.js'(store, __exports) {
document.addEventListener('readystatechange', (event) => {
if (document.readyState !== 'complete') return false;
let queue = [];
const observer = new MutationObserver((list, observer) => {
if (!queue.length) requestAnimationFrame(() => handle(queue));
queue.push(...list);
});
observer.observe(document.body, {
childList: true,
subtree: true,
});
const resizeObserver = new ResizeObserver(
(list, observer) => number(list[0].target)
);
function handle(list) {
queue = [];
for (let { addedNodes } of list) {
if (
addedNodes[0] &&
(
addedNodes[0].className === 'notion-page-content' ||
(
addedNodes[0].querySelector &&
addedNodes[0].querySelector('.notion-code-block.line-numbers')
)
)
) {
resizeObserver.disconnect();
const codeBlocks = document.querySelectorAll('.notion-code-block.line-numbers');
codeBlocks.forEach(block => {
number(block);
resizeObserver.observe(block);
});
}
}
}
function number(block) {
let codeLineNumbers = '';
let numbers = block.querySelector('#code-line-numbers');
if (!numbers) {
numbers = createElement(
'<span id="code-line-numbers"></span>'
);
const blockStyle = window.getComputedStyle(block.children[0]);
numbers.style.top = blockStyle.paddingTop;
numbers.style.bottom = blockStyle.paddingBottom;
block.append(numbers);
const temp = createElement('<span>A</span>');
block.firstChild.append(temp);
block.lineHeight = temp.getBoundingClientRect().height;
temp.remove();
}
const lines = block.firstChild.innerText.split(/\r\n|\r|\n/);
if (lines[lines.length - 1] === '') lines.pop();
let lineCounter = 0;
const wordWrap = block.firstChild.style.wordBreak === 'break-all';
for (let i = 0; i < lines.length; i++) {
lineCounter++;
codeLineNumbers += `${lineCounter}\n`;
if (wordWrap) {
const temp = document.createElement('span');
temp.innerText = lines[i];
block.firstChild.append(temp);
const lineHeight = temp.getBoundingClientRect().height;
temp.remove();
for (let j = 1; j < (lineHeight / block.lineHeight - 1); j++)
codeLineNumbers += '\n';
}
}
if (store().single_lined || codeLineNumbers.length > 2) {
block.firstChild.classList.add('code-numbered');
numbers.innerText = codeLineNumbers;
} else {
block.firstChild.classList.remove('code-numbered');
numbers.innerText = '';
}
}
});
},
},
};

View File

@ -1,9 +0,0 @@
/*
* notion-enhancer
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* under the MIT license
*/
@import './css/theme.css';
@import './css/scrollbars.css';
@import './css/titlebar.css';

View File

@ -1,106 +0,0 @@
/*
* notion-enhancer
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* under the MIT license
*/
'use strict';
module.exports = (store) => {
const helpers = require('../../pkg/helpers.js'),
path = require('path'),
fs = require('fs-extra'),
browser = require('electron').remote.getCurrentWindow(),
is_mac = process.platform === 'darwin',
buttons = {
element: helpers.createElement('<div class="window-buttons-area"></div>'),
insert: [
...((store('mods')['72886371-dada-49a7-9afc-9f275ecf29d3'] || {})
.enabled
? ['alwaysontop']
: []),
...(store().frameless && !store().tiling_mode && !is_mac
? ['minimize', 'maximize', 'close']
: []),
],
icons: {
raw: {
alwaysontop: {
on: fs.readFile(
path.resolve(`${__dirname}/icons/alwaysontop_on.svg`)
),
off: fs.readFile(
path.resolve(`${__dirname}/icons/alwaysontop_off.svg`)
),
},
minimize: fs.readFile(
path.resolve(`${__dirname}/icons/minimize.svg`)
),
maximize: {
on: fs.readFile(path.resolve(`${__dirname}/icons/maximize_on.svg`)),
off: fs.readFile(
path.resolve(`${__dirname}/icons/maximize_off.svg`)
),
},
close: fs.readFile(path.resolve(`${__dirname}/icons/close.svg`)),
},
alwaysontop() {
return browser.isAlwaysOnTop()
? buttons.icons.raw.alwaysontop.on
: buttons.icons.raw.alwaysontop.off; // '🠙' : '🠛'
},
minimize() {
return buttons.icons.raw.minimize; // '⚊'
},
maximize() {
return browser.isMaximized()
? buttons.icons.raw.maximize.on
: buttons.icons.raw.maximize.off; // '🗗' : '🗖'
},
close() {
return buttons.icons.raw.close; // '⨉'
},
},
actions: {
async alwaysontop() {
browser.setAlwaysOnTop(!browser.isAlwaysOnTop());
this.innerHTML = await buttons.icons.alwaysontop();
},
minimize() {
browser.minimize();
},
async maximize() {
browser.isMaximized() ? browser.unmaximize() : browser.maximize();
this.innerHTML = await buttons.icons.maximize();
},
close() {
browser.close();
},
},
};
if (!buttons.insert.includes('alwaysontop')) browser.setAlwaysOnTop(false);
(async () => {
for (let btn of buttons.insert) {
buttons.element.innerHTML += `<button class="window-button btn-${btn}">${await buttons.icons[
btn
]()}</button>`;
}
for (let btn of buttons.insert) {
buttons.element.querySelector(`.window-button.btn-${btn}`).onclick =
buttons.actions[btn];
}
if (store().frameless && !store().tiling_mode && !is_mac) {
window.addEventListener('resize', (event) => {
Promise.resolve(buttons.icons.maximize()).then((icon) => {
icon = icon.toString();
const el = buttons.element.querySelector('.btn-maximize');
if (el.innerHTML != icon) el.innerHTML = icon;
});
});
}
})();
return buttons;
};

View File

@ -1,269 +0,0 @@
/*
* notion-enhancer
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 TarasokUA
* under the MIT license
*/
'use strict';
module.exports = (store, __exports) => {
const electron = require('electron'),
helpers = require('../../pkg/helpers.js'),
notionIpc = require(`${helpers
.getNotionResources()
.replace(/\\/g, '/')}/app/helpers/notionIpc.js`),
{ toKeyEvent } = require('keyboardevent-from-electron-accelerator'),
tabsEnabled = (store('mods')['e1692c29-475e-437b-b7ff-3eee872e1a42'] || {})
.enabled;
document.defaultView.addEventListener('keyup', (event) => {
// additional hotkeys
if (event.key === 'F5') location.reload();
// open menu on hotkey toggle
if (store().menu_toggle) {
const hotkey = {
ctrlKey: false,
metaKey: false,
altKey: false,
shiftKey: false,
...toKeyEvent(store().menu_toggle),
};
let triggered = true;
for (let prop in hotkey)
if (
hotkey[prop] !== event[prop] &&
!(prop === 'key' && event[prop] === 'Dead')
)
triggered = false;
if (triggered) electron.ipcRenderer.send('enhancer:open-menu');
}
if (tabsEnabled) {
const tabStore = () => store('e1692c29-475e-437b-b7ff-3eee872e1a42');
if (tabStore().select_modifier) {
// switch between tabs via key modifier
const select_tab_modifier = {
ctrlKey: false,
metaKey: false,
altKey: false,
shiftKey: false,
...toKeyEvent(tabStore().select_modifier),
};
let triggered = true;
for (let prop in select_tab_modifier)
if (select_tab_modifier[prop] !== event[prop]) triggered = false;
if (
triggered &&
[
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
'ArrowRight',
'ArrowLeft',
].includes(event.key)
)
electron.ipcRenderer.sendToHost('enhancer:select-tab', event.key);
}
if (tabStore().new_tab) {
// create/close tab keybindings
const new_tab_keybinding = {
ctrlKey: false,
metaKey: false,
altKey: false,
shiftKey: false,
...toKeyEvent(tabStore().new_tab),
};
let triggered = true;
for (let prop in new_tab_keybinding)
if (new_tab_keybinding[prop] !== event[prop]) triggered = false;
if (triggered) electron.ipcRenderer.sendToHost('enhancer:new-tab');
}
if (tabStore().close_tab) {
const close_tab_keybinding = {
ctrlKey: false,
metaKey: false,
altKey: false,
shiftKey: false,
...toKeyEvent(tabStore().close_tab),
};
let triggered = true;
for (let prop in close_tab_keybinding)
if (close_tab_keybinding[prop] !== event[prop]) triggered = false;
if (triggered) electron.ipcRenderer.sendToHost('enhancer:close-tab');
}
}
});
const attempt_interval = setInterval(enhance, 500);
async function enhance() {
if (
!document.querySelector('.notion-frame') ||
!document.querySelector('.notion-sidebar') ||
!document.querySelector('.notion-topbar')
)
return;
clearInterval(attempt_interval);
// frameless
if (store().frameless && !store().tiling_mode && !tabsEnabled) {
document.body.classList.add('frameless');
// draggable area
document
.querySelector('.notion-topbar')
.prepend(helpers.createElement('<div class="window-dragarea"></div>'));
}
// window buttons
if (!tabsEnabled) {
const buttons = require('./buttons.js')(store);
document
.querySelector('.notion-topbar > div[style*="display: flex"]')
.appendChild(buttons.element);
}
document
.querySelector('.notion-history-back-button')
.parentElement.nextElementSibling.classList.add(
'notion-topbar-breadcrumb'
);
document
.querySelector('.notion-topbar-share-menu')
.parentElement.classList.add('notion-topbar-actions');
const getStyle = (prop) =>
getComputedStyle(
document.querySelector('.notion-app-inner')
).getPropertyValue(prop);
// external theming
document.defaultView.addEventListener('keydown', (event) => {
if ((event.ctrlKey || event.metaKey) && event.key === 'f') {
notionIpc.sendNotionToIndex('search:set-theme', {
'mode': document.querySelector('.notion-dark-theme')
? 'dark'
: 'light',
'colors': {
'white': getStyle('--theme--option_active-color'),
'blue': getStyle('--theme--option_active-background'),
},
'borderRadius': 3,
'textColor': getStyle('--theme--text'),
'popoverBackgroundColor': getStyle('--theme--card'),
'popoverBoxShadow': getStyle('--theme--box-shadow_strong'),
'inputBoxShadow': `box-shadow: ${getStyle(
`--theme--primary`
)} 0px 0px 0px 1px inset, ${getStyle(
`--theme--primary_hover`
)} 0px 0px 0px 2px !important`,
'inputBackgroundColor': getStyle('--theme--main'),
'dividerColor': getStyle('--theme--table-border'),
'shadowOpacity': 0.2,
});
}
});
function setAppTheme() {
const theme = document.querySelector('.notion-dark-theme')
? 'dark'
: 'light';
electron.ipcRenderer.send('enhancer:set-app-theme', theme);
}
setAppTheme();
new MutationObserver(setAppTheme).observe(
document.querySelector('.notion-app-inner'),
{ attributes: true }
);
electron.ipcRenderer.on('enhancer:get-app-theme', setAppTheme);
if (tabsEnabled) {
let tab_title = { img: '', emoji: '', text: '' };
if (process.platform === 'darwin')
document
.querySelector('.notion-sidebar [style*="37px"]:empty')
.remove();
const TITLE_OBSERVER = new MutationObserver(() =>
__electronApi.setWindowTitle('notion.so')
);
__electronApi.setWindowTitle = (title) => {
const $container =
document.querySelector(
'.notion-peek-renderer [style="padding-left: calc(126px + env(safe-area-inset-left)); padding-right: calc(126px + env(safe-area-inset-right)); max-width: 100%; width: 100%;"]'
) ||
document.querySelector(
'.notion-frame [style="padding-left: calc(96px + env(safe-area-inset-left)); padding-right: calc(96px + env(safe-area-inset-right)); max-width: 100%; margin-bottom: 8px; width: 100%;"]'
) ||
document.querySelector('.notion-peek-renderer') ||
document.querySelector('.notion-frame'),
icon = $container.querySelector(
'.notion-record-icon img:not([src^="data:"])'
),
img =
icon && icon.getAttribute('src')
? `<img src="${
icon.getAttribute('src').startsWith('/')
? 'notion://www.notion.so'
: ''
}${icon.getAttribute('src')}">`
: '',
emoji = icon ? icon.getAttribute('aria-label') : '';
let text = $container.querySelector('[placeholder="Untitled"]');
text = text
? text.innerText || 'Untitled'
: [
setTimeout(() => __electronApi.setWindowTitle(title), 250),
title,
][1];
TITLE_OBSERVER.disconnect();
TITLE_OBSERVER.observe($container, {
childList: true,
subtree: true,
characterData: true,
attributes: true,
});
if (
tab_title.img !== img ||
tab_title.emoji !== emoji ||
tab_title.text !== text
) {
tab_title = {
img,
emoji,
text,
};
electron.ipcRenderer.sendToHost('enhancer:set-tab-title', tab_title);
}
};
__electronApi.openInNewWindow = (urlPath) => {
electron.ipcRenderer.sendToHost(
'enhancer:new-tab',
`notion://www.notion.so${urlPath}`
);
};
} else if (store().frameless && !store().tiling_mode) {
let sidebar_width;
function setSidebarWidth(list) {
const new_sidebar_width =
list[0].target.style.height === 'auto'
? '0px'
: list[0].target.style.width;
if (new_sidebar_width !== sidebar_width) {
sidebar_width = new_sidebar_width;
electron.ipcRenderer.sendToHost(
'enhancer:sidebar-width',
sidebar_width
);
}
}
new MutationObserver(setSidebarWidth).observe(
document.querySelector('.notion-sidebar'),
{ attributes: true }
);
setSidebarWidth([{ target: document.querySelector('.notion-sidebar') }]);
}
}
};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,89 +0,0 @@
/*
* notion-enhancer
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 TarasokUA
* under the MIT license
*/
'use strict';
module.exports = (store, __exports) => {
const electron = require('electron'),
allWindows = () =>
electron.BrowserWindow.getAllWindows().filter(
(win) => win.getTitle() !== 'notion-enhancer menu'
),
// createWindow = __exports.createWindow,
path = require('path'),
helpers = require('../../pkg/helpers.js');
__exports.createWindow = function (relativeUrl, focused_window) {
if (!relativeUrl) relativeUrl = '';
const window_state = require(`${helpers
.getNotionResources()
.replace(/\\/g, '/')}/app/node_modules/electron-window-state/index.js`)(
{
defaultWidth: 1320,
defaultHeight: 860,
}
),
rect = {
x: window_state.x,
y: window_state.y,
width: window_state.width,
height: window_state.height,
};
focused_window =
focused_window || electron.BrowserWindow.getFocusedWindow();
if (focused_window && !focused_window.isMaximized()) {
rect.x = focused_window.getPosition()[0] + 20;
rect.y = focused_window.getPosition()[1] + 20;
rect.width = focused_window.getSize()[0];
rect.height = focused_window.getSize()[1];
}
let window = new electron.BrowserWindow({
show: false,
backgroundColor: '#ffffff',
titleBarStyle: 'hiddenInset',
frame: !store().frameless,
webPreferences: {
preload: path.resolve(
`${helpers.getNotionResources()}/app/renderer/index.js`
),
webviewTag: true,
session: electron.session.fromPartition('persist:notion'),
enableRemoteModule: true,
},
...rect,
});
window.once('ready-to-show', function () {
if (
!store().openhidden ||
allWindows().some((win) => win.isVisible() && win.id != window.id)
) {
window.show();
window.focus();
if (store().maximized) window.maximize();
if (
(focused_window && focused_window.isFullScreen()) ||
window_state.isFullScreen
)
window.setFullScreen(true);
}
});
let intended_quit = false;
window.on('close', (e) => {
if (intended_quit || !store().close_to_tray || allWindows().length > 1) {
window_state.saveState(window);
window = null;
} else {
e.preventDefault();
window.hide();
}
});
electron.app.on('before-quit', () => (intended_quit = true));
window.loadURL(__exports.getIndexUrl(relativeUrl));
return window;
};
return __exports.createWindow;
};

View File

@ -1,43 +0,0 @@
/*
* notion-enhancer
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 TarasokUA
* under the MIT license
*/
.window-buttons-area {
display: flex;
align-items: center;
font-size: 14px;
}
.window-button {
background: transparent;
border: 0;
margin: 0px 0px 0px 9px;
width: 32px;
line-height: 26px;
border-radius: 4px;
font-size: 16px;
transition: background 0.2s;
cursor: default;
}
.window-button svg {
margin-top: 8px;
width: 14px;
height: 14px;
}
.window-button svg path {
fill: currentColor;
}
.window-button svg line {
stroke: currentColor;
}
.window-button:hover {
background: var(--theme--interactive_hover);
box-shadow: 0 0 0 0.5px var(--theme--interactive_hover-border);
}
.window-button.btn-close:hover {
background: var(--theme--button_close);
color: var(--theme--button_close-fill);
}

View File

@ -1,29 +0,0 @@
/*
* notion-enhancer
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 TarasokUA
* under the MIT license
*/
[data-tweaks*='[smooth_scrollbars]'] .notion-scroller {
cursor: auto;
}
[data-tweaks*='[smooth_scrollbars]'] ::-webkit-scrollbar {
width: 8px; /* vertical */
height: 8px; /* horizontal */
-webkit-app-region: no-drag;
}
[data-tweaks*='[smooth_scrollbars]'] ::-webkit-scrollbar-corner {
background-color: transparent; /* overlap */
}
[data-tweaks*='[smooth_scrollbars]'] ::-webkit-scrollbar-thumb {
border-radius: 5px;
}
[data-tweaks*='[smooth_scrollbars]'] ::-webkit-scrollbar-thumb {
background-color: var(--theme--scrollbar);
border: 1px solid var(--theme--scrollbar-border);
}
[data-tweaks*='[smooth_scrollbars]'] ::-webkit-scrollbar-thumb:hover {
background: var(--theme--scrollbar_hover);
}

View File

@ -1,995 +0,0 @@
/*
* notion-enhancer
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 TarasokUA
* (c) 2020 Arecsu
* (c) 2020 u/zenith_illinois
* (c) 2020 admiraldus (https://github.com/admiraldus)
* under the MIT license
*/
/** app **/
.notion-body,
.notion-body.dark [style*='background: rgb(47, 52, 55)'],
.notion-body.dark [style*='background-color: rgb(47, 52, 55)'],
.notion-body:not(.dark)
.notion-light-theme
[style*='background: white']:not(.notion-help-button),
.notion-body:not(.dark)
.notion-dark-theme
[style*='background: white']:not(.notion-help-button):not([style*='box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;']),
.notion-body:not(.dark) [style*='background-color: white'] {
background: var(--theme--main) !important;
}
.notion-sidebar > div,
.notion-body.dark [style*='background: rgb(55, 60, 63)'],
.notion-body.dark [style*='background: rgb(120, 123, 123)'],
.notion-body:not(.dark) [style*='background: rgb(247, 246, 243)'],
.notion-body:not(.dark) [style*='background: rgb(223, 223, 222)'] {
background: var(--theme--sidebar) !important;
}
.notion-peek-renderer,
[style*='background: rgba(15, 15, 15, 0.6)'] {
background: var(--theme--overlay) !important;
}
.notion-frame
.notion-scroller
[style*='env(safe-area-inset-'][style*=' width: 900px'],
.notion-frame
.notion-scroller
[style*='env(safe-area-inset-'][style*=';width: 900px'],
.notion-frame
.notion-scroller
[style*='height: 30vh']
[style*='pointer-events:'][style*='max-width: 100%; width: 900px'] {
width: var(--theme--page_normal-width) !important;
}
.notion-frame
[style*='padding-left: calc(96px + env(safe-area-inset-left)); padding-right: calc(96px + env(safe-area-inset-right));'] {
padding-left: var(--theme--page-padding) !important;
padding-right: var(--theme--page-padding) !important;
}
.notion-page-content [data-block-id][style*='max-width'] {
max-width: 100% !important;
}
.notion-frame
.notion-scroller
[style*='env(safe-area-inset-'][style*=' width: 100%'],
.notion-frame
.notion-scroller
[style*='height: 30vh']
[style*='pointer-events:'][style*='max-width: 100%; width: 100%'] {
width: var(--theme--page_full-width) !important;
}
.notion-frame .notion-scroller [style*='padding-left: 136.5px;'] {
padding-left: 0 !important;
}
.notion-frame .notion-scroller [style*='padding-right: 136.5px;'] {
padding-right: 0 !important;
}
.notion-collection_view-block > :first-child,
.notion-collection_view-block .notion-scroller > :first-child {
padding-left: 0 !important;
padding-right: 0 !important;
}
.notion-peek-renderer
.notion-scroller.vertical
[style*='position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; height: 20vh;'],
.notion-peek-renderer
.notion-scroller.vertical
[style*='position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; height: 20vh;']
img {
height: var(--theme--preview_banner-height) !important;
}
[style^='position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; height: 30vh;'],
[style^='position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; height: 30vh;']
img {
height: var(--theme--page_banner-height) !important;
}
/* colour help button - one of the few specific classes notion does give us */
.notion-help-button {
background: var(--theme--interactive_hover) !important;
box-shadow: 0 0 0 0.5px var(--theme--interactive_hover-border) !important;
}
/* page preview sizing */
.notion-peek-renderer > div:nth-child(2) {
max-width: var(--theme--preview-width) !important;
}
.notion-peek-renderer .notion-page-content [style*='max-width: 943px;'] {
max-width: none !important;
}
.notion-peek-renderer
.notion-scroller.vertical
[style*='padding-left: calc(126px + env(safe-area-inset-left));'] {
padding-left: var(--theme--preview-padding) !important;
}
.notion-peek-renderer
.notion-scroller.vertical
[style*='padding-right: calc(126px + env(safe-area-inset-right));'] {
padding-right: var(--theme--preview-padding) !important;
}
.notion-peek-renderer
.notion-scroller.vertical
[style*='margin-left: calc(126px + env(safe-area-inset-left));'] {
margin-left: var(--theme--preview-padding) !important;
}
.notion-peek-renderer
.notion-scroller.vertical
[style*='margin-right: calc(126px + env(safe-area-inset-right));'] {
margin-right: var(--theme--preview-padding) !important;
}
.notion-peek-renderer .notion-page-content {
padding-left: var(--theme--preview-padding) !important;
padding-right: var(--theme--preview-padding) !important;
width: 100%;
}
/** fonts **/
[style*='Segoe UI'] {
font-family: var(--theme--font_sans) !important;
}
[style*='Georgia'] {
font-family: var(--theme--font_serif) !important;
}
[style*='iawriter-mono'] {
font-family: var(--theme--font_mono) !important;
}
[style*='SFMono-Regular'] {
font-family: var(--theme--font_code) !important;
}
.notion-selectable.notion-quote-block div[spellcheck="true"] {
font-family: var(--theme--font_quote) !important;
}
.notion-frame .notion-page-block div[placeholder='Untitled'],
.notion-overlay-container .notion-page-block div[placeholder='Untitled'] {
font-size: calc(
var(--theme--font_body-size) * (var(--theme--font_heading1-size) / 1em)
) !important;
}
[placeholder='Heading 1'] {
font-size: calc(
var(--theme--font_body-size) * (var(--theme--font_heading1-size) / 1em)
) !important;
}
[placeholder='Heading 2'] {
font-size: calc(
var(--theme--font_body-size) * (var(--theme--font_heading2-size) / 1em)
) !important;
}
[placeholder='Heading 3'] {
font-size: calc(
var(--theme--font_body-size) * (var(--theme--font_heading3-size) / 1em)
) !important;
}
.notion-frame .notion-scroller.vertical.horizontal [style*='font-size: 14px'],
.notion-overlay-container .notion-scroller.vertical [style*='font-size: 14px'] {
font-size: var(--theme--font_label-size) !important;
}
.notion-frame .notion-scroller.vertical.horizontal .notion-page-content,
.notion-overlay-container .notion-scroller.vertical .notion-page-content {
font-size: var(--theme--font_body-size) !important;
}
.notion-frame
.notion-scroller.vertical.horizontal
.notion-page-content[style*='font-size: 14px'],
.notion-overlay-container
.notion-scroller.vertical
.notion-page-content[style*='font-size: 14px'] {
font-size: var(--theme--font_body-size_small) !important;
}
.notion-code-block [placeholder=' '] {
font-size: var(--theme--font_code-size) !important;
}
.notion-sidebar [style*='font-size: 14px'] {
font-size: var(--theme--font_sidebar-size) !important;
}
/** text-block readability **/
.notion-page-content .notion-selectable.notion-text-block {
line-height: var(--theme--text-block_line-height) !important;
margin-top: var(--theme--text-block_margin-top) !important;
}
/** databases **/
.notion-body.dark [style*='background: rgb(63, 68, 71)'],
.notion-body.dark [style*='background-color: rgb(64, 68, 71);'],
.notion-body:not(.dark)
.notion-scroller.horizontal.vertical
.notion-selectable
> a[style*='background: white'],
.notion-body:not(.dark) [style*='background: rgb(247, 246, 243)'],
.notion-body:not(.dark)
.notion-dark-theme
[style*='background: white'][style*='box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;'] {
background: var(--theme--card) !important;
}
.notion-body.dark
.notion-page-block.notion-collection-item
[style*='background: rgba(255, 255, 255, 0.05)'],
.notion-body:not(.dark)
.notion-page-block.notion-collection-item
[style*='background: rgba(55, 53, 47, 0.024)'] {
background: var(--theme--gallery) !important;
}
.notion-body.dark .notion-scroller > [style*='rgb(55, 60, 63)'],
.notion-body:not(.dark) [style*='background: rgba(242, 241, 238, 0.6)'] {
background: var(--theme--select_input) !important;
}
.notion-body.dark
[style*='box-shadow: rgba(255, 255, 255, 0.14) 0px -1px inset;'],
.notion-body:not(.dark)
[style*='box-shadow: rgba(55, 53, 47, 0.16) 0px -1px 0px inset'] {
box-shadow: rgba(55, 53, 47, 0.16) 0px -1px inset !important;
}
.notion-body.dark [style*='box-shadow: rgba(255, 255, 255, 0.07) 0px 1px 0px'],
.notion-body:not(.dark)
[style*='box-shadow: rgba(55, 53, 47, 0.09) 0px 1px 0px'] {
box-shadow: var(--theme--ui-border) 0px 1px 0px !important;
}
.notion-body.dark
[style*='box-shadow: rgba(255, 255, 255, 0.14) 0px 1px 0px inset'],
.notion-body:not(.dark)
[style*='box-shadow: rgba(55, 53, 47, 0.16) 0px 1px 0px inset'] {
box-shadow: var(--theme--table-border) 0px 1px 0px inset !important;
}
.notion-body.dark [style*='box-shadow: rgb(47, 52, 55) -3px 0px 0px'] {
box-shadow: var(--theme--main) -3px 0px 0px !important;
}
.notion-body:not(.dark) [style*='box-shadow: white -3px 0px 0px;'] {
box-shadow: none !important;
}
.notion-body.dark
[style*='box-shadow: rgb(47, 52, 55) -3px 0px 0px, rgba(255, 255, 255, 0.14) 0px 1px 0px'],
.notion-body:not(.dark)
[style*='box-shadow: white -3px 0px 0px, rgba(55, 53, 47, 0.16) 0px 1px 0px'],
.notion-body:not(.dark)
[style*='box-shadow: rgba(255, 255, 255, 0.07) 0px -1px 0px'] {
box-shadow: var(--theme--main) -3px 0px 0px,
var(--theme--ui-border) 0px 1px 0px !important;
}
.notion-body.dark [style*='border-top: 1px solid rgba(255, 255, 255,'],
.notion-body:not(.dark) [style*='border-top: 1px solid rgba(55, 53, 47,'] {
border-top: 1px solid var(--theme--table-border) !important;
}
.notion-body.dark
[style*='box-shadow: rgba(255, 255, 255, 0.14) -1px 0px 0px'] {
box-shadow: var(--theme--table-border) -1px 0px 0px !important;
}
.notion-body.dark [style*='border-bottom: 1px solid rgba(255, 255, 255,'],
.notion-body:not(.dark) [style*='border-bottom: 1px solid rgba(55, 53, 47,'] {
border-bottom: 1px solid var(--theme--table-border) !important;
}
.notion-body.dark [style*='box-shadow: rgba(255, 255, 255, 0.14) 0px 1px 0px'],
.notion-body:not(.dark)
[style*='box-shadow: rgba(55, 53, 47, 0.16) 0px 1px 0px'] {
box-shadow: var(--theme--table-border) 0px 1px 0px !important;
}
.notion-body.dark [style*='border-right: 1px solid rgba(255, 255, 255,'],
.notion-body:not(.dark) [style*='border-right: 1px solid rgba(55, 53, 47,'] {
border-right: 1px solid var(--theme--table-border) !important;
}
.notion-body.dark [style*='box-shadow: rgba(255, 255, 255, 0.07) 0px -1px 0px'],
.notion-body.dark [style*='box-shadow: rgba(55, 53, 47, 0.09) 0px -1px 0px'],
.notion-body:not(.dark)
[style*='box-shadow: rgba(55, 53, 47, 0.09) 0px -1px 0px'] {
box-shadow: var(--theme--ui-border) 0px -1px 0px !important;
}
.notion-body.dark [style*='border-left: 1px solid rgba(255, 255, 255,'],
.notion-body.dark
.notion-block-permission-settings-public-access
[role='button'][style*='border-left: none'],
.notion-body:not(.dark) [style*='border-left: 1px solid rgba(55, 53, 47,'] {
border-left: 1px solid var(--theme--table-border) !important;
}
.notion-body.dark
[style*='box-shadow: rgba(255, 255, 255, 0.14) 1px 0px 0px inset'],
.notion-body:not(.dark)
[style*='box-shadow: rgba(55, 53, 47, 0.16) 1px 0px 0px inset'] {
box-shadow: var(--theme--table-border) 1px 0px 0px inset !important;
}
.notion-body:not(.dark)
[style*='box-shadow: rgba(55, 53, 47, 0.09) -1px 0px 0px'],
.notion-body:not(.dark)
[style*='box-shadow: rgba(55, 53, 47, 0.16) -1px 0px 0px'] {
box-shadow: -1px -1px 0 var(--theme--table-border) !important;
}
.notion-body.dark
[style*='background-image: linear-gradient(to right, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.14) 100%);'],
.notion-body:not(.dark)
[style*='background-image: linear-gradient(to right, rgba(55, 53, 47, 0.16) 0%, rgba(55, 53, 47, 0.16) 100%)'] {
background-image: linear-gradient(
to right,
var(--theme--bg_gray) 0%,
var(--theme--bg_gray) 100%
) !important;
}
.notion-body.dark [style*='background: rgb(71, 76, 80)'],
.notion-body.dark [style*='background: rgb(80, 85, 88)'],
.notion-body.dark [style*='background: rgb(98, 102, 104)'],
.notion-body.dark [style*='height: 1px; background: rgba(255, 255, 255, 0.07)'],
.notion-body:not(.dark) [style*='background: rgba(55, 53, 47,'],
.notion-body:not(.dark) [style*='background: rgb(239, 239, 238)'],
.notion-body:not(.dark) [style*='background: rgba(206, 205, 202, 0.5)'] {
background: var(--theme--interactive_hover) !important;
box-shadow: 0 0 0 0.5px var(--theme--interactive_hover-border) !important;
}
/* normalise inline-table size */
.notion-page-content .notion-collection_view-block[style*=' width'],
.notion-page-content .notion-collection_view-block[style^='width'] {
width: 100% !important;
}
.notion-page-content
.notion-collection_view-block
[style*='padding-left: 50px'],
.notion-page-content
.notion-collection_view-block
[style*='padding-left: 96px'],
.notion-page-content
.notion-collection_view-block
[style*='padding-left: 126px'] {
padding-left: 0 !important;
}
.notion-page-content
.notion-collection_view-block
[style*='padding-right: 50px'],
.notion-page-content
.notion-collection_view-block
[style*='padding-right: 96px'],
.notion-page-content
.notion-collection_view-block
[style*='padding-right: 126px'] {
padding-right: 0 !important;
}
.notion-page-content
.notion-collection_view-block
[style*='min-width: calc(100% - 192px);'],
.notion-page-content
.notion-collection_view-block
[style*='min-width: 708px;'] {
min-width: 100% !important;
}
.notion-page-content .notion-collection_view-block > div {
padding: 0 1px;
}
/* smooth transitions */
.notion-calendar-view-day,
.DayPicker-Day--today:not(.DayPicker-Day--selected):not(.DayPicker-Day--value):not(.DayPicker-Day--start):not(.DayPicker-Day--end),
.DayPicker-Day.DayPicker-Day--start.DayPicker-Day--selected,
.DayPicker:not(.DayPicker--interactionDisabled) .DayPicker-Day--outside:hover,
.DayPicker:not(.DayPicker--interactionDisabled)
.DayPicker-Day:not(.DayPicker-Day--disabled):not(.DayPicker-Day--selected):not(.DayPicker-Day--value):not(.DayPicker-Day--start):not(.DayPicker-Day--end) {
transition: all 200ms ease !important;
}
.notion-token-remove-button {
transition: opacity 200ms ease !important;
}
.notion-to_do-block > div > div > div[style*='background:'] {
transition: background 200ms ease !important;
}
/* fix button resizing */
.notion-collection_view-block [role='button'],
.notion-collection_view_page-block [role='button'] {
border-width: 0 !important;
}
/** general ui **/
::selection,
[style*='background: rgba(46, 170, 220,']:not([style*='background: rgba(46, 170, 220, 0)']),
[style*='background-color: rgba(46, 170, 220,']:not([style*='background-color: rgba(46, 170, 220, 0)']) {
background: var(--theme--selected) !important;
}
[style*=' color: rgb(46, 170, 220)'],
[style^='color: rgb(46, 170, 220)'] {
color: var(--theme--primary) !important;
}
[style*='fill: rgb(46, 170, 220)'] {
fill: var(--theme--primary) !important;
}
[style*='background: rgb(46, 170, 220)'],
[style*='background-color: rgb(46, 170, 220)'] {
background: var(--theme--primary) !important;
}
[style*='box-shadow: rgb(46, 170, 220) 0px 0px 0px 2px inset'] {
box-shadow: var(--theme--primary) 0px 0px 0px 2px inset !important;
}
[style*='background: rgb(6, 156, 205)'] {
background: var(--theme--primary_hover) !important;
}
[style*='background: rgb(0, 141, 190)'] {
background: var(--theme--primary_click) !important;
}
.DayPicker-Day--today:not(.DayPicker-Day--selected):not(.DayPicker-Day--value):not(.DayPicker-Day--start):not(.DayPicker-Day--end)::after,
[style*='background: rgb(235, 87, 87)'] {
background: var(--theme--primary_indicator) !important;
}
.notion-body.dark
[style*='box-shadow: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.2) 0px 3px 6px, rgba(15, 15, 15, 0.4) 0px 9px 24px'],
.notion-body:not(.dark)
[style*='box-shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px'] {
box-shadow: var(--theme--box-shadow_strong) !important;
}
.notion-body.dark
[style*='box-shadow: rgba(15, 15, 15, 0.2) 0px 0px 0px 1px, rgba(15, 15, 15, 0.2) 0px 2px 4px'],
.notion-body:not(.dark)
[style*='box-shadow: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 2px 4px'] {
box-shadow: var(--theme--box-shadow) !important;
}
.notion-to_do-block > div [role='button']:hover,
.notion-to_do-block > div [role='button']:hover .checkboxSquare,
.notion-to_do-block > div [role='button']:hover .check {
background: var(--theme--option_hover-background) !important;
}
.notion-to_do-block > div [role='button']:hover .checkboxSquare path,
.notion-to_do-block > div [role='button']:hover .check polygon {
fill: var(--theme--option_hover-color) !important;
}
.notion-to_do-block > div [role='button']:not(:hover) .check {
background: var(--theme--option_active-background) !important;
}
.notion-to_do-block > div [role='button']:not(:hover) .check polygon {
fill: var(--theme--option_active-color) !important;
}
.notion-to_do-block .checkboxSquare {
background: var(--theme--option-background) !important;
}
.notion-to_do-block .checkboxSquare path {
fill: var(--theme--option-color) !important;
}
[style*='color: rgb(235, 87, 87); border: 1px solid rgba(235, 87, 87, 0.5);'] {
color: var(--theme--danger_text) !important;
border: 1px solid var(--theme--danger_border) !important;
}
/* inputs */
.notion-focusable:focus-within {
box-shadow: var(--theme--primary_hover) 0px 0px 0px 2px !important;
}
/** content colours **/
.notion-body,
.notion-frame .notion-page-block,
.notion-body.dark [style*=' color: rgba(255, 255, 255, 0.9)'],
.notion-body.dark [style^='color: rgba(255, 255, 255, 0.9)'],
.notion-body.dark [style*=' color: rgba(255, 255, 255, 0.7)'],
.notion-body.dark [style^='color: rgba(255, 255, 255, 0.7)'],
.notion-body:not(.dark) [style*=' color: rgb(55, 53, 47);'],
.notion-body:not(.dark) [style^='color: rgb(55, 53, 47);'] {
color: var(--theme--text) !important;
}
.notion-body.dark [style*='color: rgba(255, 255, 255, 0.6)'],
.notion-body:not(.dark) [style*='color: rgba(55, 53, 47, 0.6)'],
.notion-body:not(.dark) [style*='color: rgba(25, 23, 17, 0.6)'] {
color: var(--theme--text_ui) !important;
}
::placeholder {
opacity: 1 !important;
}
::placeholder,
[style*='-webkit-text-fill-color:'],
.notion-body.dark [style*='color: rgba(255, 255, 255, 0.4)'],
.notion-body.dark [style*='color: rgba(255, 255, 255, 0.4)']::before,
.notion-body:not(.dark) [style*='color: rgba(55, 53, 47, 0.4)'],
.notion-body:not(.dark) [style*='color: rgba(55, 53, 47, 0.4)']::before {
color: var(--theme--text_ui_info) !important;
-webkit-text-fill-color: var(--theme--text_ui_info) !important;
}
.notion-body.dark [style*='fill: rgb(202, 204, 206)'] {
fill: var(--theme--text) !important;
}
.notion-body.dark [style*='fill: rgba(255, 255, 255, 0.6)'],
.notion-body:not(.dark) [style*='fill: rgba(55, 53, 47, 0.8)'],
.notion-body:not(.dark) [style*='fill: rgba(55, 53, 47, 0.6)'],
.notion-body:not(.dark) [style*='fill: rgba(25, 23, 17, 0.6)'] {
fill: var(--theme--text_ui) !important;
}
.notion-body.dark [style*='fill: rgba(202, 204, 206, 0.6)'],
.notion-body.dark [style*='fill: rgba(202, 204, 206, 0.4)'],
.notion-body:not(.dark) [style*='fill: rgba(55, 53, 47, 0.4)'],
.notion-body:not(.dark) [style*='fill: rgba(55, 53, 47, 0.3)'] {
fill: var(--theme--text_ui_info) !important;
}
.notion-body.dark [style*='border-color:rgba(255,255,255,0.4);opacity:0.7'],
.notion-body:not(.dark) [style*='border-color:rgba(55,53,47,0.4);opacity:0.7'] {
border-color: var(--theme--text_ui_info) !important;
}
.notion-body.dark [style*='caret-color: rgba(255, 255, 255, 0.9)'],
.notion-body:not(.dark) [style*='caret-color: rgb(55, 53, 47)'] {
caret-color: var(--theme--text) !important;
}
.notion-body.dark [style*='color:rgba(151,154,155,0.95)'],
.notion-body.dark
[style*='color: rgba(255, 255, 255, 0.6); fill: rgba(255, 255, 255, 0.6);'],
.notion-body:not(.dark) [style*='color:rgb(155,154,151)'],
.notion-body:not(.dark)
[style*='color: rgba(55, 53, 47, 0.6); fill: rgba(55, 53, 47, 0.6);'] {
color: var(--theme--text_gray) !important;
fill: var(--theme--text_gray) !important;
}
.notion-body.dark [style*='background:rgb(69,75,78)'],
.notion-body:not(.dark) [style*='background:rgb(235,236,237)'] {
background: var(--theme--bg_gray) !important;
color: var(--theme--bg_gray-text) !important;
}
.notion-body.dark
[style*='color:rgba(151,154,155,0.95)']
[style*='background:rgb(69,75,78)'],
.notion-body.dark
[style*='color: rgba(255, 255, 255, 0.6); fill: rgba(255, 255, 255, 0.6);']
[style*='background:rgb(69,75,78)'],
.notion-body:not(.dark)
[style*='color:rgb(155,154,151)']
[style*='background:rgb(235,236,237)'],
.notion-body:not(.dark)
[style*='color: rgba(55, 53, 47, 0.6); fill: rgba(55, 53, 47, 0.6);']
[style*='background:rgb(235,236,237)'] {
background: var(--theme--bg_gray) !important;
color: var(--theme--text_gray) !important;
fill: var(--theme--text_gray) !important;
}
.notion-body.dark [style*='background: rgb(69, 75, 78)'],
.notion-body:not(.dark) [style*='background: rgb(235, 236, 237)'] {
background: var(--theme--line_gray) !important;
color: var(--theme--line_gray-text) !important;
}
.notion-body.dark [style*='background: rgba(151, 154, 155, 0.5)'],
.notion-body:not(.dark) [style*='background: rgba(140, 46, 0, 0.2)'] {
background: var(--theme--select_gray) !important;
color: var(--theme--select_gray-text) !important;
}
.notion-body.dark [style*='background: rgba(69, 75, 78, 0.3)'],
.notion-body:not(.dark) [style*='background: rgba(235, 236, 237, 0.3)'] {
background: var(--theme--callout_gray) !important;
color: var(--theme--callout_gray-text) !important;
}
.notion-body.dark [style*='color:rgb(147,114,100)'],
.notion-body.dark
[style*='color: rgb(147, 114, 100); fill: rgb(147, 114, 100);'],
.notion-body:not(.dark) [style*='color:rgb(100,71,58)'],
.notion-body:not(.dark)
[style*='color: rgb(100, 71, 58); fill: rgb(100, 71, 58);'] {
color: var(--theme--text_brown) !important;
fill: var(--theme--text_brown) !important;
}
.notion-body.dark [style*='background:rgb(67,64,64)'],
.notion-body:not(.dark) [style*='background:rgb(233,229,227)'] {
background: var(--theme--bg_brown) !important;
color: var(--theme--bg_brown-text) !important;
}
.notion-body.dark
[style*='color:rgb(147,114,100)']
[style*='background:rgb(67,64,64)'],
.notion-body.dark
[style*='color: rgb(147, 114, 100); fill: rgb(147, 114, 100);']
[style*='background:rgb(67,64,64)'],
.notion-body:not(.dark)
[style*='color:rgb(100,71,58)']
[style*='background:rgb(233,229,227)'],
.notion-body:not(.dark)
[style*='color: rgb(100, 71, 58); fill: rgb(100, 71, 58);']
[style*='background:rgb(233,229,227)'] {
background: var(--theme--bg_brown) !important;
color: var(--theme--text_brown) !important;
fill: var(--theme--text_brown) !important;
}
.notion-body.dark [style*='background: rgb(67, 64, 64)'],
.notion-body:not(.dark) [style*='background: rgb(233, 229, 227)'] {
background: var(--theme--line_brown) !important;
color: var(--theme--line_brown-text) !important;
}
.notion-body.dark [style*='background: rgba(147, 114, 100, 0.5)'],
.notion-body:not(.dark) [style*='background: rgba(140, 46, 0, 0.2)'] {
background: var(--theme--select_brown) !important;
color: var(--theme--select_brown-text) !important;
}
.notion-body.dark [style*='background: rgba(67, 64, 64, 0.3)'],
.notion-body:not(.dark) [style*='background: rgba(233, 229, 227, 0.3)'] {
background: var(--theme--callout_brown) !important;
color: var(--theme--callout_brown-text) !important;
}
.notion-body.dark [style*='color:rgb(255,163,68)'],
.notion-body.dark [style*='color: rgb(255, 163, 68); fill: rgb(255, 163, 68);'],
.notion-body:not(.dark) [style*='color:rgb(217,115,13)'],
.notion-body:not(.dark)
[style*='color: rgb(217, 115, 13); fill: rgb(217, 115, 13);'] {
color: var(--theme--text_orange) !important;
fill: var(--theme--text_orange) !important;
}
.notion-body.dark [style*='background:rgb(89,74,58)'],
.notion-body:not(.dark) [style*='background:rgb(250,235,221)'] {
background: var(--theme--bg_orange) !important;
color: var(--theme--bg_orange-text) !important;
}
.notion-body.dark
[style*='color:rgb(255,163,68)']
[style*='background:rgb(89,74,58)'],
.notion-body.dark
[style*='color: rgb(255, 163, 68); fill: rgb(255, 163, 68);']
[style*='background:rgb(89,74,58)'],
.notion-body:not(.dark)
[style*='color:rgb(217,115,13)']
[style*='background:rgb(250,235,221)'],
.notion-body:not(.dark)
[style*='color: rgb(217, 115, 13); fill: rgb(217, 115, 13);']
[style*='background:rgb(250,235,221)'] {
background: var(--theme--bg_orange) !important;
color: var(--theme--text_orange) !important;
fill: var(--theme--text_orange) !important;
}
.notion-body.dark [style*='background: rgb(89, 74, 58)'],
.notion-body:not(.dark) [style*='background: rgb(250, 235, 221)'] {
background: var(--theme--line_orange) !important;
color: var(--theme--line_orange-text) !important;
}
.notion-body.dark [style*='background: rgba(255, 163, 68, 0.5)'],
.notion-body:not(.dark) [style*='background: rgba(245, 93, 0, 0.2)'] {
background: var(--theme--select_orange) !important;
color: var(--theme--select_orange-text) !important;
}
.notion-body.dark [style*='background: rgba(89, 74, 58, 0.3)'],
.notion-body:not(.dark) [style*='background: rgba(250, 235, 221, 0.3)'] {
background: var(--theme--callout_orange) !important;
color: var(--theme--callout_orange-text) !important;
}
.notion-body.dark [style*='color:rgb(255,220,73)'],
.notion-body.dark [style*='color: rgb(255, 220, 73); fill: rgb(255, 220, 73);'],
.notion-body:not(.dark) [style*='color:rgb(223,171,1)'],
.notion-body:not(.dark)
[style*='color: rgb(223, 171, 1); fill: rgb(223, 171, 1);'] {
color: var(--theme--text_yellow) !important;
fill: var(--theme--text_yellow) !important;
}
.notion-body.dark [style*='background:rgb(89,86,59)'],
.notion-body:not(.dark) [style*='background:rgb(251,243,219)'] {
background: var(--theme--bg_yellow) !important;
color: var(--theme--bg_yellow-text) !important;
}
.notion-body.dark
[style*='color:rgb(255,220,73)']
[style*='background:rgb(89,86,59)'],
.notion-body.dark
[style*='color: rgb(255, 220, 73); fill: rgb(255, 220, 73);']
[style*='background:rgb(89,86,59)'],
.notion-body:not(.dark)
[style*='color:rgb(223,171,1)']
[style*='background:rgb(251,243,219)'],
.notion-body:not(.dark)
[style*='color: rgb(223, 171, 1); fill: rgb(223, 171, 1);']
[style*='background:rgb(251,243,219)'] {
background: var(--theme--bg_yellow) !important;
color: var(--theme--text_yellow) !important;
fill: var(--theme--text_yellow) !important;
}
.notion-body.dark [style*='background: rgb(89, 86, 59)'],
.notion-body:not(.dark) [style*='background: rgb(251, 243, 219)'] {
background: var(--theme--line_yellow) !important;
color: var(--theme--line_yellow-text) !important;
}
.notion-body.dark [style*='background: rgba(255, 220, 73, 0.5)'],
.notion-body:not(.dark) [style*='background: rgba(233, 168, 0, 0.2)'] {
background: var(--theme--select_yellow) !important;
color: var(--theme--select_yellow-text) !important;
}
.notion-body.dark [style*='background: rgba(89, 86, 59, 0.3)'],
.notion-body:not(.dark) [style*='background: rgba(251, 243, 219, 0.3)'] {
background: var(--theme--callout_yellow) !important;
color: var(--theme--callout_yellow-text) !important;
}
.notion-body.dark [style*='color:rgb(77,171,154)'],
.notion-body.dark [style*='color: rgb(77, 171, 154); fill: rgb(77, 171, 154);'],
.notion-body:not(.dark) [style*='color:rgb(15,123,108)'],
.notion-body:not(.dark)
[style*='color: rgb(15, 123, 108); fill: rgb(15, 123, 108);'] {
color: var(--theme--text_green) !important;
fill: var(--theme--text_green) !important;
}
.notion-body.dark [style*='background:rgb(53,76,75)'],
.notion-body:not(.dark) [style*='background:rgb(221,237,234)'] {
background: var(--theme--bg_green) !important;
color: var(--theme--bg_green-text) !important;
}
.notion-body.dark
[style*='color:rgb(77,171,154)']
[style*='background:rgb(53,76,75)'],
.notion-body.dark
[style*='color: rgb(77, 171, 154); fill: rgb(77, 171, 154);']
[style*='background:rgb(53,76,75)'],
.notion-body:not(.dark)
[style*='color:rgb(15,123,108)']
[style*='background:rgb(221,237,234)'],
.notion-body:not(.dark)
[style*='color: rgb(15, 123, 108); fill: rgb(15, 123, 108);']
[style*='background:rgb(221,237,234)'] {
background: var(--theme--bg_green) !important;
color: var(--theme--text_green) !important;
fill: var(--theme--text_green) !important;
}
.notion-body.dark [style*='background: rgb(53, 76, 75)'],
.notion-body:not(.dark) [style*='background: rgb(221, 237, 234)'] {
background: var(--theme--line_green) !important;
color: var(--theme--line_green-text) !important;
}
.notion-body.dark [style*='background: rgba(77, 171, 154, 0.5)'],
.notion-body:not(.dark) [style*='background: rgba(0, 135, 107, 0.2)'] {
background: var(--theme--select_green) !important;
color: var(--theme--select_green-text) !important;
}
.notion-body.dark [style*='background: rgba(53, 76, 75, 0.3)'],
.notion-body:not(.dark) [style*='background: rgba(221, 237, 234, 0.3)'] {
background: var(--theme--callout_green) !important;
color: var(--theme--callout_green-text) !important;
}
.notion-body.dark [style*='color:rgb(82,156,202)'],
.notion-body.dark [style*='color: rgb(82, 156, 202); fill: rgb(82, 156, 202);'],
.notion-body:not(.dark) [style*='color:rgb(11,110,153)'],
.notion-body:not(.dark)
[style*='color: rgb(11, 110, 153); fill: rgb(11, 110, 153);'] {
color: var(--theme--text_blue) !important;
fill: var(--theme--text_blue) !important;
}
.notion-body.dark [style*='background:rgb(54,73,84)'],
.notion-body:not(.dark) [style*='background:rgb(221,235,241)'] {
background: var(--theme--bg_blue) !important;
color: var(--theme--bg_blue-text) !important;
}
.notion-body.dark
[style*='color:rgb(82,156,202)']
[style*='background:rgb(54,73,84)'],
.notion-body.dark
[style*='color: rgb(82, 156, 202); fill: rgb(82, 156, 202);']
[style*='background:rgb(54,73,84)'],
.notion-body:not(.dark)
[style*='color:rgb(11,110,153)']
[style*='background:rgb(221,235,241)'],
.notion-body:not(.dark)
[style*='color: rgb(11, 110, 153); fill: rgb(11, 110, 153);']
[style*='background:rgb(221,235,241)'] {
background: var(--theme--bg_blue) !important;
color: var(--theme--text_blue) !important;
fill: var(--theme--text_blue) !important;
}
.notion-body.dark [style*='background: rgb(54, 73, 84)'],
.notion-body:not(.dark) [style*='background: rgb(221, 235, 241)'] {
background: var(--theme--line_blue) !important;
color: var(--theme--line_blue-text) !important;
}
.notion-body.dark [style*='background: rgba(82, 156, 202, 0.5)'],
.notion-body:not(.dark) [style*='background: rgba(0, 120, 223, 0.2)'] {
background: var(--theme--select_blue) !important;
color: var(--theme--select_blue-text) !important;
}
.notion-body.dark [style*='background: rgba(54, 73, 84, 0.3)'],
.notion-body:not(.dark) [style*='background: rgba(221, 235, 241, 0.3)'] {
background: var(--theme--callout_blue) !important;
color: var(--theme--callout_blue-text) !important;
}
.notion-body.dark [style*='color:rgb(154,109,215)'],
.notion-body.dark
[style*='color: rgb(154, 109, 215); fill: rgb(154, 109, 215);'],
.notion-body:not(.dark) [style*='color:rgb(105,64,165)'],
.notion-body:not(.dark)
[style*='color: rgb(105, 64, 165); fill: rgb(105, 64, 165);'] {
color: var(--theme--text_purple) !important;
fill: var(--theme--text_purple) !important;
}
.notion-body.dark [style*='background:rgb(68,63,87)'],
.notion-body:not(.dark) [style*='background:rgb(234,228,242)'] {
background: var(--theme--bg_purple) !important;
color: var(--theme--bg_purple-text) !important;
}
.notion-body.dark
[style*='color:rgb(154,109,215)']
[style*='background:rgb(68,63,87)'],
.notion-body.dark
[style*='color: rgb(154, 109, 215); fill: rgb(154, 109, 215);']
[style*='background:rgb(68,63,87)'],
.notion-body:not(.dark)
[style*='color:rgb(105,64,165)']
[style*='background:rgb(234,228,242)'],
.notion-body:not(.dark)
[style*='color: rgb(105, 64, 165); fill: rgb(105, 64, 165);']
[style*='background:rgb(234,228,242)'] {
background: var(--theme--bg_purple) !important;
color: var(--theme--text_purple) !important;
fill: var(--theme--text_purple) !important;
}
.notion-body.dark [style*='background: rgb(68, 63, 87)'],
.notion-body:not(.dark) [style*='background: rgb(234, 228, 242)'] {
background: var(--theme--line_purple) !important;
color: var(--theme--line_purple-text) !important;
}
.notion-body.dark [style*='background: rgba(154, 109, 215, 0.5)'],
.notion-body:not(.dark) [style*='background: rgba(103, 36, 222, 0.2)'] {
background: var(--theme--select_purple) !important;
color: var(--theme--select_purple-text) !important;
}
.notion-body.dark [style*='background: rgba(68, 63, 87, 0.3)'],
.notion-body:not(.dark) [style*='background: rgba(234, 228, 242, 0.3)'] {
background: var(--theme--callout_purple) !important;
color: var(--theme--callout_purple-text) !important;
}
.notion-body.dark [style*='color:rgb(226,85,161)'],
.notion-body.dark [style*='color: rgb(226, 85, 161); fill: rgb(226, 85, 161);'],
.notion-body:not(.dark) [style*='color:rgb(173,26,114)'],
.notion-body:not(.dark)
[style*='color: rgb(173, 26, 114); fill: rgb(173, 26, 114);'] {
color: var(--theme--text_pink) !important;
fill: var(--theme--text_pink) !important;
}
.notion-body.dark [style*='background:rgb(83,59,76)'],
.notion-body:not(.dark) [style*='background:rgb(244,223,235)'] {
background: var(--theme--bg_pink) !important;
color: var(--theme--bg_pink-text) !important;
}
.notion-body.dark
[style*='color:rgb(226,85,161)']
[style*='background:rgb(83,59,76)'],
.notion-body.dark
[style*='color: rgb(226, 85, 161); fill: rgb(226, 85, 161);']
[style*='background:rgb(83,59,76)'],
.notion-body:not(.dark)
[style*='color:rgb(173,26,114)']
[style*='background:rgb(244,223,235)'],
.notion-body:not(.dark)
[style*='color: rgb(173, 26, 114); fill: rgb(173, 26, 114);']
[style*='background:rgb(244,223,235)'] {
background: var(--theme--bg_pink) !important;
color: var(--theme--text_pink) !important;
fill: var(--theme--text_pink) !important;
}
.notion-body.dark [style*='background: rgb(83, 59, 76)'],
.notion-body:not(.dark) [style*='background: rgb(244, 223, 235)'] {
background: var(--theme--line_pink) !important;
color: var(--theme--line_pink-text) !important;
}
.notion-body.dark [style*='background: rgba(226, 85, 161, 0.5)'],
.notion-body:not(.dark) [style*='background: rgba(221, 0, 129, 0.2)'] {
background: var(--theme--select_pink) !important;
color: var(--theme--select_pink-text) !important;
}
.notion-body.dark [style*='background: rgba(83, 59, 76, 0.3)'],
.notion-body:not(.dark) [style*='background: rgba(244, 223, 235, 0.3)'] {
background: var(--theme--callout_pink) !important;
color: var(--theme--callout_pink-text) !important;
}
.notion-body.dark [style*='color:rgb(255,115,105)'],
.notion-body.dark
[style*='color: rgb(255, 115, 105); fill: rgb(255, 115, 105);'],
.notion-body:not(.dark) [style*='color:rgb(224,62,62)'],
.notion-body:not(.dark)
[style*='color: rgb(224, 62, 62); fill: rgb(224, 62, 62);'] {
color: var(--theme--text_red) !important;
fill: var(--theme--text_red) !important;
}
.notion-body.dark [style*='background:rgb(89,65,65)'],
.notion-body:not(.dark) [style*='background:rgb(251,228,228)'] {
background: var(--theme--bg_red) !important;
color: var(--theme--bg_red-text) !important;
}
.notion-body.dark
[style*='color:rgb(255,115,105)']
[style*='background:rgb(89,65,65)'],
.notion-body.dark
[style*='color: rgb(255, 115, 105); fill: rgb(255, 115, 105);']
[style*='background:rgb(89,65,65)'],
.notion-body:not(.dark)
[style*='color:rgb(224,62,62)']
[style*='background:rgb(251,228,228)'],
.notion-body:not(.dark)
[style*='color: rgb(224, 62, 62); fill: rgb(224, 62, 62);']
[style*='background:rgb(251,228,228)'] {
background: var(--theme--bg_red) !important;
color: var(--theme--text_red) !important;
fill: var(--theme--text_red) !important;
}
.notion-body.dark [style*='background: rgb(89, 65, 65)'],
.notion-body:not(.dark) [style*='background: rgb(251, 228, 228)'] {
background: var(--theme--line_red) !important;
color: var(--theme--line_red-text) !important;
}
.notion-body.dark [style*='background: rgba(255, 115, 105, 0.5);'],
.notion-body:not(.dark) [style*='background: rgba(255, 0, 26, 0.2)'] {
background: var(--theme--select_red) !important;
color: var(--theme--select_red-text) !important;
}
.notion-body.dark [style*='background: rgba(89, 65, 65, 0.3)'],
.notion-body:not(.dark) [style*='background: rgba(251, 228, 228, 0.3)'] {
background: var(--theme--callout_red) !important;
color: var(--theme--callout_red-text) !important;
}
/* fix highlight padding: this isn't a typo */
[style*='background:rgb('] {
padding-bottom: 3px !important;
}
/** code **/
[style*='color:#EB5757'] {
color: var(--theme--code_inline-text) !important;
background: var(--theme--code_inline-background) !important;
}
.notion-page-content .notion-code-block {
background: var(--theme--code-background) !important;
}
.notion-code-block > div {
color: var(--theme--code-text) !important;
}
.notion-code-block .token.function {
color: var(--theme--code_function) !important;
}
.notion-code-block .token.keyword {
color: var(--theme--code_keyword) !important;
}
.notion-code-block .token.tag {
color: var(--theme--code_tag) !important;
}
.notion-code-block .token.operator {
color: var(--theme--code_operator) !important;
}
.notion-code-block .token.important {
color: var(--theme--code_important) !important;
}
.notion-code-block .token.property {
color: var(--theme--code_property) !important;
}
.notion-code-block .token.builtin {
color: var(--theme--code_builtin) !important;
}
.notion-code-block .token.attr-name {
color: var(--theme--code_attr-name) !important;
}
.notion-code-block .token.attr-value {
color: var(--theme--code_attr-value) !important;
}
.notion-code-block .token.comment {
color: var(--theme--code_comment) !important;
}
.notion-code-block .token.punctuation {
color: var(--theme--code_punctuation) !important;
}
.notion-code-block .token.doctype {
color: var(--theme--code_doctype) !important;
}
.notion-code-block .token.number {
color: var(--theme--code_number) !important;
}
.notion-code-block .token.string {
color: var(--theme--code_string) !important;
}

View File

@ -1,48 +0,0 @@
/*
* notion-enhancer
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 TarasokUA
* under the MIT license
*/
@import './buttons.css';
.frameless .notion-topbar {
height: calc(var(--configured--dragarea_height, 15px) + 45px) !important;
}
.frameless .window-dragarea {
height: var(--configured--dragarea_height, 15px);
width: 100%;
}
.frameless .window-dragarea {
background: var(--theme--dragarea);
}
.frameless [style*='top: 10.4972px'] {
top: calc(10.4972px + var(--configured--dragarea_height, 15px)) !important;
}
@media (max-width: 760px) {
.frameless .notion-topbar {
height: calc(var(--configured--dragarea_height, 15px) + 80px) !important;
}
.frameless .notion-topbar > :nth-child(2) {
height: 80px !important;
display: grid !important;
grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
}
.window-buttons-area {
grid-row: 1;
grid-column: 9 / span end;
justify-content: flex-end;
}
.notion-topbar-breadcrumb {
grid-row: 2;
grid-column: 1 / span 8;
}
.notion-topbar-actions {
grid-row: 2;
grid-column: 9 / span end;
justify-content: flex-end;
}
}

View File

@ -1,762 +0,0 @@
/*
* notion-enhancer
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* under the MIT license
*/
'use strict';
const store = require('../../pkg/store.js'),
{ createElement, getEnhancements } = require('../../pkg/helpers.js'),
fs = require('fs-extra'),
path = require('path'),
electron = require('electron'),
{ toKeyEvent } = require('keyboardevent-from-electron-accelerator');
window['__start'] = async () => {
document.body.setAttribute('data-platform', process.platform);
// mod loader
const modules = getEnhancements();
if (modules.loaded.length) {
console.info(
`<notion-enhancer> enhancements loaded: ${modules.loaded
.map((mod) => mod.name)
.join(', ')}.`
);
}
if (modules.invalid.length) {
createAlert(
'error',
`invalid mods found: ${modules.invalid
.map((mod) => `<b>${mod}</b>`)
.join(', ')}.`
).append();
}
const coreStore = (...args) => {
const mod = modules.loaded.find(
(m) => m.id === '0f0bf8b6-eae6-4273-b307-8fc43f2ee082'
);
return !args.length
? store(mod.id, mod.defaults)
: args.length === 1 && typeof args[0] === 'object'
? store(mod.id, { ...mod.defaults, ...args[0] })
: store(args[0], { ...mod.defaults, ...args[1] });
};
electron.ipcRenderer.send('enhancer:get-app-theme');
electron.ipcRenderer.on('enhancer:set-app-theme', (event, theme) => {
document.body.className = `notion-${theme}-theme`;
});
const buttons = require('./buttons.js')(() => ({
'72886371-dada-49a7-9afc-9f275ecf29d3': {
enabled: (store('mods')['72886371-dada-49a7-9afc-9f275ecf29d3'] || {})
.enabled,
},
tiling_mode: coreStore().tiling_mode,
frameless: coreStore().frameless,
}));
document.querySelector('#titlebar').appendChild(buttons.element);
function createAlert(type, message) {
if (!type)
throw Error('<notion-enhancer> @ createAlert: no alert type specified');
const el = createElement(`
<section class="${type}" role="alert">
<p>${message}</p>
</section>
`);
return {
el,
resolve() {
el.remove();
},
prepend() {
document.querySelector('#alerts').prepend(el);
return this;
},
append() {
document.querySelector('#alerts').appendChild(el);
return this;
},
};
}
// update checker
fetch(
`https://api.github.com/repos/notion-enhancer/notion-enhancer/releases/latest`
)
.then((res) => res.json())
.then((res) => {
const raw_v = require('./mod.js').version,
version = {
local: raw_v.split(/[~-]/g)[0],
repo: res.tag_name.slice(1),
};
if (version.local == version.repo) return;
// compare func from https://github.com/substack/semver-compare
version.sorted = [version.local, version.repo].sort((a, b) => {
const pa = a.split('.'),
pb = b.split('.');
for (let i = 0; i < 3; i++) {
let na = Number(pa[i]),
nb = Number(pb[i]);
if (na > nb) return 1;
if (nb > na) return -1;
if (!isNaN(na) && isNaN(nb)) return 1;
if (isNaN(na) && !isNaN(nb)) return -1;
}
return 0;
});
createAlert(
'warning',
version.sorted[0] == version.local
? `update <b>v${version.repo}</b> available!<br>
run <code>npm i -g notion-enhancer</code>`
: `local build <b>v${raw_v}</b> is unstable.`
).prepend();
});
const $popup = document.querySelector('#popup');
document.addEventListener('keyup', (event) => {
if (event.key === 'F5') location.reload();
// further-configuration popup
if (
$popup.classList.contains('visible') &&
['Enter', 'Escape'].includes(event.key)
)
$popup.classList.remove('visible');
// close window on hotkey toggle
if (coreStore().menu_toggle) {
const hotkey = {
ctrlKey: false,
metaKey: false,
altKey: false,
shiftKey: false,
...toKeyEvent(coreStore().menu_toggle),
};
let triggered = true;
for (let prop in hotkey)
if (
hotkey[prop] !== event[prop] &&
!(prop === 'key' && event[prop] === 'Dead')
)
triggered = false;
if (triggered || ((event.ctrlKey || event.metaKey) && event.key === 'w'))
electron.remote.getCurrentWindow().close();
}
// focus search
const meta =
!(event.ctrlKey || event.metaKey) && !event.altKey && !event.shiftKey;
if (
meta &&
document.activeElement.getAttribute('tabindex') === '0' &&
event.key === 'Enter'
)
document.activeElement.click();
if (document.activeElement.tagName.toLowerCase() === 'input') {
if (document.activeElement.type === 'checkbox' && event.key === 'Enter')
document.activeElement.checked = !document.activeElement.checked;
if (
['Escape', 'Enter'].includes(event.key) &&
document.activeElement.type !== 'checkbox' &&
(document.activeElement.parentElement.id !== 'search' ||
event.key === 'Escape')
)
document.activeElement.blur();
} else if (meta && event.key === '/')
document.querySelector('#search > input').focus();
if (
(event.ctrlKey || event.metaKey) &&
event.key === 'f' &&
!event.altKey &&
!event.shiftKey
)
document.querySelector('#search > input').focus();
});
let colorpicker_target = null;
const $colorpicker = colorjoe
.rgb('colorpicker')
.on('change', function (color) {
if (!colorpicker_target) return;
colorpicker_target.elem.style.setProperty(
'--configured--color-value',
color.css()
);
store(colorpicker_target.id)[colorpicker_target.key] = color.css();
})
.update();
document
.querySelector('#colorpicker')
.appendChild(createElement('<button class="close-modal"></button>'));
document.querySelectorAll('#popup .close-modal').forEach((el) =>
el.addEventListener('click', (event) => {
$popup.classList.remove('visible');
})
);
const conflicts = {
relaunch: null,
detected: () =>
store('mods', {
conflicts: { dark: false, light: false },
}).conflicts,
alerts: [],
check() {
document.body.classList.remove('conflict');
conflicts.alerts.forEach((alert) => alert.resolve());
conflicts.alerts = [];
const enabled = modules.loaded.filter(
(mod) =>
store('mods', { [mod.id]: { enabled: false } })[mod.id].enabled &&
mod.tags.includes('theme')
),
dark = enabled.filter((mod) => mod.tags.includes('dark')),
light = enabled.filter((mod) => mod.tags.includes('light'));
for (let mode of [
[dark, 'dark'],
[light, 'light'],
]) {
const conflictID = mode[0]
.map((mod) => mod.id)
.sort()
.join('||');
if (
conflicts.detected()[mode[1]] &&
conflicts.detected()[mode[1]][0] === conflictID &&
conflicts.detected()[mode[1]][1]
)
continue;
if (mode[0].length > 1) {
document.body.classList.add('conflict');
conflicts.detected()[mode[1]] = [conflictID, false];
const alert = createAlert(
'error',
`conflicting ${mode[1]} themes: ${mode[0]
.map((mod) => `<b>${mod.name}</b>`)
.join(
', '
)}. <br> resolve or <span data-action="dismiss" tabindex="0">dismiss</span> to continue.`
);
alert.el
.querySelector('[data-action="dismiss"]')
.addEventListener('click', (event) => {
conflicts.detected()[mode[1]] = [conflictID, true];
conflicts.check();
});
alert.append();
conflicts.alerts.push(alert);
} else conflicts.detected()[mode[1]] = false;
}
search();
},
};
function modified() {
conflicts.check();
if (conflicts.relaunch) return;
conflicts.relaunch = createAlert(
'info',
'changes may not fully apply until <span data-action="relaunch" tabindex="0">app relaunch</span>.'
);
conflicts.relaunch.el
.querySelector('[data-action="relaunch"]')
.addEventListener('click', (event) => {
electron.remote.app.relaunch();
electron.remote.app.quit();
});
conflicts.relaunch.append();
}
const search_filters = {
enabled: true,
disabled: true,
tags: new Set(
modules.loaded
.map((mod) => mod.tags)
.flat()
.sort()
),
};
function innerText(elem) {
let text = '';
for (let $node of elem.childNodes) {
if ($node.nodeType === 3) text += $node.textContent;
if ($node.nodeType === 1) {
if ($node.getAttribute('data-tooltip'))
text += $node.getAttribute('data-tooltip');
text += ['text', 'number'].includes($node.type)
? $node.value
: innerText($node);
}
}
return text;
}
function search() {
modules.loaded.forEach((mod) => {
const $search_input = document.querySelector('#search > input'),
conflictingIDs = [conflicts.detected().dark, conflicts.detected().light]
.filter((conflict) => conflict && !conflict[1])
.map(([mods, dismissed]) => mods.split('||'))
.flat();
if (
conflictingIDs.length ||
document.body.classList.contains('reorder')
) {
$search_input.disabled = true;
} else $search_input.disabled = false;
if (
!document.body.classList.contains('reorder') &&
(conflictingIDs.length
? !conflictingIDs.some((id) => id.includes(mod.id))
: (mod.elem.classList.contains('enabled') &&
!search_filters.enabled) ||
(mod.elem.classList.contains('disabled') &&
!search_filters.disabled) ||
!mod.tags.some((tag) => search_filters.tags.has(tag)) ||
($search_input.value &&
!innerText(mod.elem)
.toLowerCase()
.includes($search_input.value.toLowerCase().trim())))
)
return (mod.elem.style.display = 'none');
mod.elem.style.display = 'block';
});
}
document.querySelector('#search > input').addEventListener('input', search);
function createTag(tagname, onclick, color) {
if (!tagname)
throw Error('<notion-enhancer> @ createTag: no tagname specified');
if (!onclick)
throw Error('<notion-enhancer> @ createTag: no action specified');
const el = createElement(
`<span class="selected" ${
color ? `style="--tag_color: ${color}" ` : ''
}tabindex="0">${tagname}</span>`
);
document.querySelector('#tags').append(el);
el.addEventListener('click', (event) => {
if (
!document.body.classList.contains('reorder') &&
!document.body.classList.contains('conflict')
) {
el.className = el.className === 'selected' ? '' : 'selected';
onclick(el.className === 'selected');
}
});
return el;
}
createTag('enabled', (state) => [
((search_filters.enabled = state), search()),
]);
createTag('disabled', (state) => [
(search_filters.disabled = state),
search(),
]);
for (let tag of search_filters.tags)
createTag(`#${tag}`, (state) => [
state ? search_filters.tags.add(tag) : search_filters.tags.delete(tag),
search(),
]);
// mod info + options
function markdown(string) {
const parsed = string
.split('\n')
.map((line) =>
line
.trim()
.replace(/\s+/g, ' ')
// > quote
.replace(/^>\s+(.+)$/g, '<blockquote>$1</blockquote>')
// ~~strikethrough~~
.replace(/([^\\])?~~((?:(?!~~).)*[^\\])~~/g, '$1<s>$2</s>')
// __underline__
.replace(/([^\\])?__((?:(?!__).)*[^\\])__/g, '$1<u>$2</u>')
// **bold**
.replace(/([^\\])?\*\*((?:(?!\*\*).)*[^\\])\*\*/g, '$1<b>$2</b>')
// *italic*
.replace(/([^\\])?\*([^*]*[^\\*])\*/g, '$1<i>$2</i>')
// _italic_
.replace(/([^\\])?_([^_]*[^\\_])_/g, '$1<i>$2</i>')
// `code`
.replace(/([^\\])?`([^`]*[^\\`])`/g, '$1<code>$2</code>')
// ![image_title](source)
.replace(
/([^\\])?\!\[([^\]]*[^\\\]]?)\]\(([^)]*[^\\)])\)/g,
`$1<img alt="$2" src="$3" onerror="this.remove()">`
)
// [link](destination)
.replace(
/([^\\])?\[([^\]]*[^\\\]]?)\]\(([^)]*[^\\)])\)/g,
'$1<a href="$3">$2</a>'
)
)
.map((line) =>
line.startsWith('<blockquote>') ? line : `<p>${line}</p>`
)
.join('');
return parsed;
}
const file_icon = await fs.readFile(
path.resolve(`${__dirname}/icons/file.svg`)
),
question_icon = (
await fs.readFile(path.resolve(`${__dirname}/icons/question.svg`))
).toString();
function createOption(opt, id) {
let $opt;
const desc = opt.desc
? question_icon.replace(
'<svg',
`<svg data-tooltip="${opt.desc.replace(/"/g, '&quot;')}"`
)
: '';
switch (opt.type) {
case 'toggle':
$opt = `
<input type="checkbox" id="${opt.type}_${id}--${opt.key}"
${store(id, { [opt.key]: opt.value })[opt.key] ? 'checked' : ''}/>
<label for="${opt.type}_${id}--${opt.key}">
<span class="name">${opt.label}${desc}</span>
<span class="switch"></span>
</label>
`;
break;
case 'select':
$opt = `
<label for="${opt.type}_${id}--${opt.key}">${opt.label}${desc}</label>
<select id="${opt.type}_${id}--${opt.key}">
${opt.value
.map((val) => `<option value="${val}">${val}</option>`)
.join('')}
</select>
`;
break;
case 'input':
$opt = `
<label for="${opt.type}_${id}--${opt.key}">${opt.label}${desc}</label>
<input type="${typeof value === 'number' ? 'number' : 'text'}" id="${
opt.type
}_${id}--${opt.key}">
`;
break;
case 'color':
$opt = `
<label for="${opt.type}_${id}--${opt.key}">${opt.label}${desc}</label>
<input type="button" id="${opt.type}_${id}--${opt.key}">
`;
break;
case 'file':
$opt = `
<input type="file" id="${opt.type}_${id}--${opt.key}"
${
opt.extensions
? ` accept="${opt.extensions
.map((ext) => (ext.startsWith('.') ? ext : `.${ext}`))
.join(',')}"`
: ''
}>
<label for="${opt.type}_${id}--${opt.key}">
<span class="label">
<span class="name">${opt.label}${desc}</span>
<button class="clear"></button>
</span>
<span class="choose">
${file_icon}
<span class="path">${
store(id)[opt.key]
? store(id)[opt.key].split(path.sep).reverse()[0]
: 'choose a file...'
}</span>
</span>
</label>
`;
}
$opt = createElement(`<p class="${opt.type}">${$opt}</p>`);
if (opt.type === 'color') {
$opt
.querySelector(`#${opt.type}_${id}--${opt.key}`)
.style.setProperty(
'--configured--color-value',
store(id, { [opt.key]: opt.value })[opt.key]
);
} else if (opt.type === 'file') {
$opt.querySelector('.clear').addEventListener('click', (event) => {
store(id)[opt.key] = '';
$opt.querySelector('.path').innerText = 'choose a file...';
});
} else {
$opt.querySelector(`#${opt.type}_${id}--${opt.key}`).value = store(id, {
[opt.key]: opt.type === 'select' ? opt.value[0] : opt.value,
})[opt.key];
}
return $opt;
}
const $modules = document.querySelector('#modules'),
fileExists = (file) => fs.pathExistsSync(path.resolve(file));
for (let mod of modules.loaded) {
const enabled =
mod.alwaysActive ||
store('mods', {
[mod.id]: { enabled: false },
})[mod.id].enabled,
author =
typeof mod.author === 'object'
? mod.author
: {
name: mod.author,
link: `https://github.com/${mod.author}`,
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(`
<section class="${enabled ? 'enabled' : 'disabled'}${
mod.tags.includes('core') ? ' core' : ''
}" id="${mod.id}">
<div class="meta">
<h3 ${
mod.alwaysActive
? `>${mod.name}`
: `class="toggle">
<input type="checkbox" id="enable_${mod.id}"
${enabled ? 'checked' : ''} />
<label for="enable_${mod.id}">
<span class="name">${mod.name}</span>
<span class="switch"></span>
</label>`
}</h3>
<p class="tags">${mod.tags
.map((tag) => (tag.startsWith('#') ? tag : `#${tag}`))
.join(' ')}</p>
<div class="desc">${markdown(mod.desc)}</div>
<p>
<a href="${author.link}" class="author">
<img src="${author.avatar}" onerror="this.src='./icons/user.png'">
${author.name}
</a>
<span class="version">v${mod.version}</span>
</p>
</div>
${
mod.options && mod.options.length
? '<div class="options"></div>'
: ''
}
</section>
`);
const $enable = mod.elem.querySelector(`#enable_${mod.id}`);
if ($enable)
$enable.addEventListener('click', (event) => {
store('mods', { [mod.id]: { enabled: false } })[mod.id].enabled =
$enable.checked;
mod.elem.className = store('mods', { [mod.id]: { enabled: false } })[
mod.id
].enabled
? 'enabled'
: '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();
modified();
});
const $options = mod.elem.querySelector('.options');
if ($options)
for (const opt of mod.options) {
if (
Object.keys(opt.platformOverwrite || {}).some(
(platform) => process.platform === platform
)
) {
continue;
}
const $opt = createOption(opt, mod.id);
if (opt.type === 'color') {
const $preview = $opt.querySelector('input');
$opt.addEventListener('click', (event) => {
colorpicker_target = {
id: mod.id,
key: opt.key,
elem: $preview,
};
$colorpicker.set(store(mod.id)[opt.key]);
$popup.classList.add('visible');
});
} else {
$opt
.querySelector(`#${opt.type}_${mod.id}--${opt.key}`)
.addEventListener('change', (event) => {
modified();
if (opt.type === 'toggle') {
store(mod.id)[opt.key] = event.target.checked;
} else if (opt.type === 'file') {
if (event.target.files.length)
store(mod.id)[opt.key] = event.target.files[0].path;
$opt.querySelector('.path').innerText = store(mod.id)[opt.key]
? store(mod.id)[opt.key].split(path.sep).reverse()[0]
: 'choose a file...';
} else
store(mod.id)[opt.key] =
typeof opt.value === 'number'
? +event.target.value
: event.target.value;
});
}
$options.appendChild($opt);
}
if (mod.tags.includes('core')) $modules.append(mod.elem);
}
document
.querySelectorAll('input[type="checkbox"]')
.forEach((checkbox) =>
checkbox.addEventListener('click', (event) => event.target.blur())
);
conflicts.check();
// draggable re-ordering
const draggable = {
state: 0,
tags: ['b', 'span'],
$toggle: document.querySelector('#draggable-toggle'),
list: modules.loaded
.filter((m) => !m.tags.includes('core'))
.map((m) => m.elem),
target: null,
render() {
draggable.target = null;
for (let $node of draggable.list) {
$node.draggable = false;
$modules.append($node);
}
},
mouseover(event) {
if (!draggable.target && event.target.innerText) {
for (let $node of draggable.list) $node.draggable = false;
const $node = draggable.list.find(
(node) => node.innerText === event.target.innerText
);
if ($node) $node.draggable = draggable.state;
}
},
};
document.addEventListener('dragstart', (event) => {
draggable.target = event.target;
event.target.style.opacity = 0.5;
});
document.addEventListener('dragend', (event) => {
event.target.style.opacity = '';
});
document.addEventListener('dragover', (event) => {
event.preventDefault();
document
.querySelectorAll('.dragged-over')
.forEach((el) => el.classList.remove('dragged-over'));
const $node = [
draggable.list[0].previousElementSibling,
...draggable.list,
].find((node) => node.innerText === event.target.innerText);
if ($node) $node.classList.add('dragged-over');
});
document.addEventListener('drop', (event) => {
event.preventDefault();
document
.querySelectorAll('.dragged-over')
.forEach((el) => el.classList.remove('dragged-over'));
if (
draggable.target &&
draggable.target.innerText !== event.target.innerText
) {
const from = draggable.list.findIndex(
(node) => node.innerText === draggable.target.innerText
),
to =
event.target.innerText ===
draggable.list[0].previousElementSibling.innerText
? 0
: draggable.list.findIndex(
(node) => node.innerText === event.target.innerText
) + 1;
if (to >= 0) {
draggable.list.splice(
to > from ? to - 1 : to,
0,
draggable.list.splice(from, 1)[0]
);
store('mods').priority = draggable.list.map((m) => m.id);
}
}
draggable.render();
modified();
});
document.addEventListener('mouseover', draggable.mouseover);
draggable.render();
draggable.$toggle.addEventListener('click', (event) => {
draggable.state = !draggable.state;
draggable.tags = draggable.tags.reverse();
draggable.$toggle.innerHTML = `
<${draggable.tags[0]} data-bolded="configure">configure</${draggable.tags[0]}> |
<${draggable.tags[1]} data-bolded="reorder">reorder</${draggable.tags[1]}>
`;
document.body.classList[draggable.state ? 'add' : 'remove']('reorder');
$modules
.querySelectorAll('input')
.forEach((input) => (input.disabled = draggable.state));
search();
});
const $tooltip = document.querySelector('#tooltip');
document.querySelectorAll('[data-tooltip]').forEach((el) => {
el.addEventListener('mouseenter', (e) => {
$tooltip.innerText = el.getAttribute('data-tooltip');
$tooltip.classList.add('active');
});
el.addEventListener('mouseover', (e) => {
$tooltip.style.top = e.clientY - $tooltip.clientHeight + 'px';
$tooltip.style.left =
e.clientX < window.innerWidth / 2 ? e.clientX + 'px' : '';
$tooltip.style.right =
e.clientX > window.innerWidth / 2
? window.innerWidth - e.clientX + 'px'
: '';
});
el.addEventListener('mouseleave', (e) =>
$tooltip.classList.remove('active')
);
});
};

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="250" height="250" fill="currentColor" viewBox="0 0 250 250"><path d="M124.859 234.52L67.5474 135.736H102.683V12.184H147.323V135.736H182.459L124.859 234.52Z" fill="currentColor"/></svg>

Before

Width:  |  Height:  |  Size: 231 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="250" height="250" fill="currentColor" viewBox="0 0 250 250"><path d="M102.683 234.52V110.968H67.5474L124.859 12.184L182.459 110.968H147.323V234.52H102.683Z" fill="currentColor"/></svg>

Before

Width:  |  Height:  |  Size: 231 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="250" height="250" fill="none" viewBox="0 0 250 250"><line x1="21.393" x2="233.525" y1="229.525" y2="17.393" stroke="#000" stroke-miterlimit="4.139" stroke-width="30"/><line x1="17.607" x2="229.739" y1="17.393" y2="229.525" stroke="#000" stroke-linejoin="round" stroke-width="30"/></svg>

Before

Width:  |  Height:  |  Size: 333 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M224 136V0H24C10.7 0 0 10.7 0 24v464c0 13.3 10.7 24 24 24h336c13.3 0 24-10.7 24-24V160H248c-13.2 0-24-10.8-24-24zm160-14.1v6.1H256V0h6.1c6.4 0 12.5 2.5 17 7l97.9 98c4.5 4.5 7 10.6 7 16.9z"/></svg>

Before

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="250" height="250" fill="currentColor" viewBox="0 0 250 250"><path d="M14.7346 227.26V7.03998H235.215V227.26H14.7346ZM46.4546 195.8H203.495V70.48H46.4546V195.8Z" fill="currentColor"/></svg>

Before

Width:  |  Height:  |  Size: 235 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="250" height="250" fill="currentColor" viewBox="0 0 250 250"><path d="M16.1311 225.96V76.72H84.5111V8.07999H233.751V157.32H165.371V225.96H16.1311ZM110.771 53.58V76.72H165.371V131.32H207.491V53.58H110.771ZM42.3911 199.96H139.111V122.22H42.3911V199.96Z" fill="currentColor"/></svg>

Before

Width:  |  Height:  |  Size: 325 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="250" height="250" fill="currentColor" viewBox="0 0 250 250"><path d="M17.8021 138.04V106.072H232.074V138.04H17.8021Z" fill="currentColor"/></svg>

Before

Width:  |  Height:  |  Size: 192 B

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 448c-110.532 0-200-89.431-200-200 0-110.495 89.472-200 200-200 110.491 0 200 89.471 200 200 0 110.53-89.431 200-200 200zm107.244-255.2c0 67.052-72.421 68.084-72.421 92.863V300c0 6.627-5.373 12-12 12h-45.647c-6.627 0-12-5.373-12-12v-8.659c0-35.745 27.1-50.034 47.579-61.516 17.561-9.845 28.324-16.541 28.324-29.579 0-17.246-21.999-28.693-39.784-28.693-23.189 0-33.894 10.977-48.942 29.969-4.057 5.12-11.46 6.071-16.666 2.124l-27.824-21.098c-5.107-3.872-6.251-11.066-2.644-16.363C184.846 131.491 214.94 112 261.794 112c49.071 0 101.45 38.304 101.45 88.8zM298 368c0 23.159-18.841 42-42 42s-42-18.841-42-42 18.841-42 42-42 42 18.841 42 42z"/></svg>

Before

Width:  |  Height:  |  Size: 849 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 KiB

View File

@ -1,653 +0,0 @@
/*
* notion-enhancer
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* under the MIT license
*/
@import './css/buttons.css';
@import './css/scrollbars.css';
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@keyframes fade {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
* {
box-sizing: border-box;
word-break: break-word;
text-decoration: none;
text-size-adjust: 100%;
font-family: var(--theme--font_sans);
outline-color: var(--theme--table-border);
}
html,
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
display: block;
overflow: hidden;
background: var(--theme--main);
color: var(--theme--text);
}
main {
padding: 1em 1em 2.9em 1em;
height: 100%;
overflow: auto;
}
main section {
border-radius: 2px;
margin-bottom: 0.75em;
}
/* inline formatting */
code {
border-radius: 0.1em;
padding: 0.2em 0.4em;
font: 0.85em var(--theme--font_code);
background: var(--theme--code_inline-background);
}
button {
color: var(--theme--text);
}
u {
text-decoration: underline;
}
s {
text-decoration: line-through;
}
/* titlebar */
#titlebar::before {
content: '';
position: absolute;
width: 100%;
-webkit-app-region: no-drag;
top: 0;
left: 0;
height: 2px;
}
#titlebar {
display: flex;
-webkit-app-region: drag;
background: var(--theme--dragarea);
}
#titlebar button {
-webkit-app-region: no-drag;
}
#titlebar .window-buttons-area {
margin: 0.4em 0.4em 0.4em auto;
}
#titlebar .window-buttons-area:empty {
display: none;
}
[data-platform='darwin'] #titlebar {
height: 2.65em;
}
/* alerts */
#alerts [role='alert'] {
display: flex;
padding: 0.75em;
background: var(--theme--interactive_hover);
border: 1px solid var(--theme--interactive_hover-border);
}
#alerts [role='alert']::before {
content: '!';
display: block;
/* margin: auto 0; */
font-weight: bold;
font-size: 1.2em;
padding-right: 0.5rem;
color: var(--theme--interactive_hover-border);
}
#alerts [role='alert'] p {
font-size: 1rem;
margin: auto 0;
padding-left: 0.5em;
color: var(--theme--line_text);
}
#alerts .error::before {
color: var(--theme--select_red);
}
#alerts .error {
color: var(--theme--line_red-text);
background: var(--theme--line_red);
border-color: var(--theme--select_red);
}
#alerts .warning::before {
color: var(--theme--select_yellow);
}
#alerts .warning {
color: var(--theme--line_yellow-text);
background: var(--theme--line_yellow);
border-color: var(--theme--select_yellow);
}
#alerts .info::before {
color: var(--theme--select_blue);
}
#alerts .info {
color: var(--theme--line_blue-text);
background: var(--theme--line_blue);
border-color: var(--theme--select_blue);
}
#alerts .success::before {
content: '✓';
color: var(--theme--select_green);
}
#alerts .success {
color: var(--theme--line_green-text);
background: var(--theme--line_green);
border-color: var(--theme--select_green);
}
#alerts code {
background: transparent;
text-decoration: underline;
}
[data-action] {
text-decoration: underline dotted;
cursor: pointer;
}
/* search */
#search {
position: relative;
margin-bottom: 0.75em;
}
#search > svg {
position: absolute;
width: 1em;
height: 1em;
top: 1.3em;
left: 1em;
}
#search > svg path {
fill: var(--theme--text_ui_info);
}
#search > input {
width: 100%;
padding: 1em 1.4em 1em 2.8em;
font: 1em var(--theme--font_sans);
background: var(--theme--card);
border: 1px solid var(--theme--table-border);
color: var(--theme--text);
border-radius: 2px;
}
#search > input::placeholder {
font-weight: bold;
color: var(--theme--text_ui_info);
}
#search > input:focus {
box-shadow: var(--theme--table-border) 0.04em 0.04em,
var(--theme--table-border) -0.04em -0.04em,
var(--theme--table-border) -0.04em 0.04em,
var(--theme--table-border) 0.04em -0.04em;
outline: none;
}
#search #tags > span {
cursor: pointer;
display: inline-block;
font-size: 0.8em;
padding: 0.2em 0.5em;
margin-top: 0.5em;
background: var(--theme--option-background);
color: var(--theme--option-color);
border-radius: 2px;
transition: color 200ms, background 200ms, opacity 200ms;
user-select: none;
}
#search #tags > span:not(:last-child) {
margin-right: 0.5em;
}
#search #tags > span:hover {
background: var(--theme--option_hover-background);
color: var(--theme--option_hover-color);
}
#search #tags > span::before {
content: '× ';
}
#search #tags > .selected {
background: var(--tag_color, var(--theme--option_active-background));
color: var(--theme--option_active-color);
}
#search #tags > .selected::before {
content: '✓ ';
}
/* module meta */
#modules {
position: relative;
}
#modules section {
background: var(--theme--sidebar);
border: 1px solid var(--theme--table-border);
}
#modules section > div {
padding: 0.75em;
}
.notion-light-theme #modules section {
background: var(--theme--main);
}
#modules section h3,
#modules section p {
margin: 0;
font-size: 1rem;
}
#modules section .desc {
margin: 0.3em 0 0.4em 0;
font-size: 0.9em;
}
#modules section .desc p {
font-size: inherit;
margin: 0;
}
#modules section .desc blockquote {
margin: 0.3em 0;
border-left: 0.3em solid var(--theme--table-border);
padding-left: 0.7em;
}
#modules section .desc a {
color: currentColor;
text-decoration: underline dotted;
}
#modules section .desc img {
width: 100%;
max-width: 20em;
margin: 0.5em 0;
}
#modules section .desc :first-child img:first-child {
margin-top: 0;
}
#modules section .desc :last-child img:last-child {
margin-bottom: 0;
}
#modules section .author {
color: currentColor;
}
#modules section .author img {
max-height: 1em;
max-width: 1em;
margin-bottom: 0.15625em;
display: inline-block;
vertical-align: middle;
border-radius: 50%;
}
#modules section .tags,
#modules section .version {
font-size: 0.85em;
color: var(--theme--text_ui);
}
/* module options */
#modules .disabled .options {
display: none;
}
#modules section .options {
border-top: 1px solid var(--theme--table-border);
background: var(--theme--card);
}
#modules section .options p {
font-size: 0.9em;
}
#modules section .options p:not(:last-child) {
padding-bottom: 0.5em;
border-bottom: 0.5px solid var(--theme--table-border);
margin-bottom: 0.5em;
}
svg[data-tooltip] {
height: 1em;
width: 1em;
margin: 0 0 -2px 1px;
color: var(--theme--text_ui_info);
}
#tooltip {
pointer-events: none;
position: absolute;
padding: 0.25em 0.5em 0.5em 0.5em;
margin: 0 1em;
border-radius: 3px;
box-shadow: var(--theme--box-shadow_strong);
border-right-width: 1px;
font-size: calc(var(--theme--font_label-size) * 0.8);
background: var(--theme--interactive_hover);
opacity: 0;
transition: opacity 120ms ease-in;
}
#tooltip.active {
opacity: 1;
}
.toggle *,
.input *,
.select *,
.color *,
.file * {
cursor: pointer;
}
.select select,
.input input[type='text'],
.input input[type='number'],
.file input[type='file'] + label .choose {
width: 100%;
margin: 0.25em 0;
font-size: 0.9rem;
padding: 0.4rem 0.2rem;
border: none;
color: var(--theme--text);
background: var(--theme--main);
}
.select select:focus,
.input input[type='text']:focus,
.input input[type='number']:focus,
.file input[type='file']:focus + label .choose,
.file input[type='file'] + label .choose:hover {
outline: var(--theme--table-border) solid 2px;
}
.file input[type='file'],
.toggle input[type='checkbox'] {
opacity: 0;
width: 0.1px;
height: 0.1px;
position: fixed;
}
.input input[type='text'],
.input input[type='number'] {
padding: 0.4rem;
cursor: text;
}
.file input[type='file'] + label .label {
position: relative;
display: flex;
}
.file input[type='file'] + label .label .name {
flex-basis: calc(100% - 1.5rem);
}
.file input[type='file'] + label .label .clear {
font-size: 1rem;
position: absolute;
top: 0.4em;
right: 0;
width: 1em;
height: 0.1em;
border: 0.35em solid var(--theme--card);
background: currentColor;
}
.file input[type='file'] + label .choose {
display: block;
white-space: nowrap;
overflow: hidden;
}
.file input[type='file'] + label .choose svg {
padding-top: 0.5em;
height: 1.25em;
width: 1.25em;
}
.toggle input[type='checkbox'] + label {
display: flex;
--menu--toggle_bg: rgba(135, 131, 120, 0.3);
}
.toggle input[type='checkbox'] + label .name {
flex-basis: calc(100% - 2.25em);
margin-right: 0.75em;
}
.toggle input[type='checkbox'] + label .switch {
position: relative;
top: 0.2em;
float: right;
height: 1em;
width: 1.85em;
padding: 0.1em;
background: var(--menu--toggle_bg);
border-radius: 3.14em;
transition: background 300ms;
}
.toggle input[type='checkbox'] + label .switch::before {
content: '';
display: block;
width: 0.8em;
height: 0.8em;
border-radius: 50%;
transform: translateX(var(--menu--toggle_offset, 0));
transition: transform 350ms, box-shadow 350ms;
background: var(--theme--option_active-color);
/* box-shadow: 2px 1px 4px var(--theme--table-border); */
}
.toggle input[type='checkbox']:checked + label {
--menu--toggle_offset: 0.8em;
--menu--toggle_bg: var(--theme--primary);
}
.color {
display: flex;
}
.color label {
flex-basis: 70%;
}
.color input[type='button'] {
flex-basis: 30%;
box-shadow: 2px 1px 4px var(--theme--table-border);
border: 1px solid var(--theme--option_active-color);
border-radius: 3px;
background: var(--configured--color-value);
margin: 0;
}
.color input[type='button']:focus {
box-shadow: 3px 2px 5px var(--theme--table-border);
}
/* further-configuration popup */
#popup,
#popup-overlay {
position: absolute;
top: 0;
height: 100vh;
width: 100vw;
}
#popup {
display: none;
}
#popup.visible {
display: flex;
animation: fade 200ms ease;
}
#popup-overlay {
background: var(--theme--overlay);
}
.colorPicker {
margin: auto;
position: relative;
border: 1px solid var(--theme--table-border);
background: var(--theme--card);
}
.colorPicker .twod {
border-radius: 4px;
}
.colorPicker .twod .bg {
border-radius: 2px;
}
.colorPicker .oned,
.colorPicker .oned .bg {
margin-left: 0;
height: 212.5px;
}
.colorPicker .oned .bg {
border-radius: 4px;
border: 1px solid var(--theme--table-border);
}
.colorPicker > button {
display: block;
position: absolute;
bottom: 8px;
right: 8px;
margin: 0;
padding: 0;
border: none;
width: 21px;
height: 20px;
cursor: pointer;
background: transparent;
transition: background 0.2s;
}
.colorPicker > button::after {
content: '×';
font-size: 1.5em;
position: relative;
bottom: 5px;
}
.colorPicker > button:hover {
background: var(--theme--interactive_hover);
border-radius: 4px;
box-shadow: 0 0 0 0.5px var(--theme--interactive_hover-border);
}
.colorPicker > button:focus {
outline: none;
box-shadow: 0 0 0 1px var(--theme--table-border);
}
.colorPicker .twod .pointer .shape.shape1 {
width: 11px;
height: 11px;
}
.colorPicker .twod .pointer .shape.shape2 {
width: 9px;
height: 9px;
}
.colorPicker .oned .pointer .shape {
height: 6.5px;
margin-left: 0;
border: 2px solid #fff;
box-shadow: 0 0 0 1px #000;
}
.shape {
cursor: pointer;
}
@media (max-width: 300px) {
.colorPicker .twod,
.colorPicker .twod .bg {
width: 200px;
height: 200px;
}
.colorPicker .oned,
.colorPicker .oned .bg {
height: 172.5px;
}
}
@media (max-width: 250px) {
.colorPicker .twod,
.colorPicker .twod .bg {
width: 150px;
height: 150px;
}
.colorPicker .oned,
.colorPicker .oned .bg {
height: 132.5px;
}
}
/* draggable re-ordering of mods */
#draggable-toggle {
background: none;
border: none;
margin-top: 0.8em;
padding-left: 0;
cursor: pointer;
color: var(--theme--text_ui);
}
[data-bolded] {
display: inline-flex;
flex-direction: column;
}
[data-bolded]::after {
content: attr(data-bolded);
height: 0;
visibility: hidden;
overflow: hidden;
user-select: none;
pointer-events: none;
font-weight: bold;
}
.reorder #search #tags > span,
.reorder #search #tags > span:hover,
.conflict #search #tags > span,
.conflict #search #tags > span:hover {
opacity: 0.7;
background: var(--theme--option-background);
}
.reorder #search #tags > .selected,
.reorder #search #tags > .selected:hover,
.conflict #search #tags > .selected,
.conflict #search #tags > .selected:hover {
background: var(--tag_color, var(--theme--option_active-background));
}
.reorder #modules .dragged-over::after {
content: '';
height: 0.25em;
width: 99%;
position: absolute;
margin: 0.3em 0;
opacity: 0.7;
background: var(--theme--selected);
}
.reorder #modules .switch,
.reorder #modules .tags,
.reorder #modules .desc,
.reorder #modules .options,
.reorder #modules .author,
.reorder #modules .version {
display: none;
}
.reorder #modules .core .toggle * {
cursor: text;
}
.reorder #modules section:not(.core) label::before {
content: '::';
margin-right: 0.4em;
color: var(--theme--text_ui);
}

View File

@ -1,43 +0,0 @@
<!DOCTYPE html>
<html data-tweaks="[smooth_scrollbars]" lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>notion-enhancer menu</title>
<script src="./colorjoe/min.js"></script>
<link rel="stylesheet" href="./colorjoe/picker.css" />
<style>
body {
display: none;
}
</style>
</head>
<body class="notion-dark-theme">
<header id="titlebar"></header>
<main>
<div id="alerts"></div>
<div id="search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path
d="M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"
></path>
</svg>
<input type="text" placeholder="search ('/' to focus)" />
<div id="tags"></div>
<button id="draggable-toggle">
<b data-bolded="configure">configure</b> |
<span data-bolded="reorder">reorder</span>
</button>
</div>
<div id="modules"></div>
</main>
<section id="popup">
<div id="popup-overlay" class="close-modal"></div>
<div id="colorpicker"></div>
</section>
<span id="tooltip"></span>
<script>
window['__start']();
</script>
</body>
</html>

View File

@ -1,103 +0,0 @@
/*
* notion-enhancer
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* under the MIT license
*/
'use strict';
module.exports = {
id: '0f0bf8b6-eae6-4273-b307-8fc43f2ee082',
alwaysActive: true,
tags: ['core'],
name: 'notion-enhancer core',
desc: 'the cli, modloader, menu, & tray.',
version: require('../../package.json').version,
author: 'dragonwocky',
options: [
{
key: 'autoresolve',
label: 'auto-resolve theme conflicts',
desc:
'when a theme is enabled any other themes of the same mode (light/dark) will be disabled.',
type: 'toggle',
value: false,
},
{
key: 'openhidden',
label: 'hide app on open',
desc:
'app can be made visible by clicking the tray icon or using the hotkey.',
type: 'toggle',
value: false,
},
{
key: 'maximized',
label: 'auto-maximise windows',
desc:
'whenever a window is un-hidden or is created it will be maximised.',
type: 'toggle',
value: false,
},
{
key: 'close_to_tray',
label: 'close window to the tray',
desc: `pressing the × close button will hide the app instead of quitting it.\
it can be re-shown by clicking the tray icon or using the hotkey.`,
type: 'toggle',
value: true,
platformOverwrite: {
darwin: true,
},
},
{
key: 'frameless',
label: 'integrated titlebar',
desc: `replace the native titlebar with buttons inset into the app.`,
type: 'toggle',
value: true,
platformOverwrite: {
darwin: false,
},
},
{
key: 'tiling_mode',
label: 'tiling window manager mode',
desc: `completely remove the close/minimise/maximise buttons -
this is for a special type of window manager. if you don't understand it, don't use it.`,
type: 'toggle',
value: false,
},
{
key: 'hotkey',
label: 'window display hotkey:',
desc: 'used to toggle hiding/showing all app windows.',
type: 'input',
value: 'CommandOrControl+Shift+A',
},
{
key: 'menu_toggle',
label: 'open enhancements menu hotkey:',
desc: 'used to toggle opening/closing this menu while notion is focused.',
type: 'input',
value: 'Alt+E',
},
{
key: 'default_page',
label: 'default page id/url:',
desc: `every new tab/window that isn't opening a url via the notion://\
protocol will load this page. to get a page link from within the app,\
go to the triple-dot menu and click "copy link".\
leave blank to just load the last page you opened.`,
type: 'input',
value: '',
},
],
hacks: {
'main/main.js': require('./tray.js'),
'main/systemMenu.js': require('./systemMenu.js'),
'main/createWindow.js': require('./createWindow.js'),
'renderer/index.js': require('./render.js'),
'renderer/preload.js': require('./client.js'),
},
};

File diff suppressed because it is too large Load Diff

View File

@ -1,477 +0,0 @@
/*
* notion-enhancer
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* under the MIT license
*/
'use strict';
module.exports = (store, __exports) => {
const electron = require('electron'),
fs = require('fs-extra'),
{ getNotionResources } = require('../../pkg/helpers.js'),
__notion = getNotionResources(),
createWindow = require(`${__notion}/app/main/createWindow.js`),
config = require(`${__notion}/app/config.js`),
notion_intl = require(`${__notion}/app/shared/notion-intl/index.js`),
localizationHelper = require(`${__notion}/app/helpers/localizationHelper.js`),
isMac = process.platform === 'darwin',
// why is it inversed? i have no idea, but for some reason this is what works
tabsEnabled = !(store('mods')['e1692c29-475e-437b-b7ff-3eee872e1a42'] || {})
.enabled,
menuMessages = notion_intl.defineMessages({
fileMenuTitle: {
id: 'desktopTopbar.fileMenu.title',
defaultMessage: 'File',
},
editMenuTitle: {
id: 'desktopTopbar.editMenu.title',
defaultMessage: 'Edit',
},
viewMenuTitle: {
id: 'desktopTopbar.viewMenu.title',
defaultMessage: 'View',
},
windowMenuTitle: {
id: 'desktopTopbar.windowMenu.title',
defaultMessage: 'Window',
},
helpTitle: {
id: 'desktopTopbar.helpMenu.title',
defaultMessage: 'Help',
},
newWindow: {
id: 'desktopTopbar.fileMenu.newWindow',
defaultMessage: 'New Window',
},
closeWindow: {
id: 'desktopTopbar.fileMenu.close',
defaultMessage: 'Close Window',
},
quit: {
id: 'desktopTopbar.fileMenu.quit',
defaultMessage: 'Exit',
},
undo: {
id: 'desktopTopbar.editMenu.undo',
defaultMessage: 'Undo',
},
redo: {
id: 'desktopTopbar.editMenu.redo',
defaultMessage: 'Redo',
},
cut: {
id: 'desktopTopbar.editMenu.cut',
defaultMessage: 'Cut',
},
copy: {
id: 'desktopTopbar.editMenu.copy',
defaultMessage: 'Copy',
},
paste: {
id: 'desktopTopbar.editMenu.paste',
defaultMessage: 'Paste',
},
selectAll: {
id: 'desktopTopbar.editMenu.selectAll',
defaultMessage: 'Select All',
},
startSpeaking: {
id: 'desktopTopbar.editMenu.speech.startSpeaking',
defaultMessage: 'Start Speaking',
},
stopSpeaking: {
id: 'desktopTopbar.editMenu.speech.stopSpeaking',
defaultMessage: 'Stop Speaking',
},
speech: {
id: 'desktopTopbar.editMenu.speech',
defaultMessage: 'Speech',
},
reload: {
id: 'desktopTopbar.viewMenu.reload',
defaultMessage: 'Reload',
},
togglefullscreen: {
id: 'desktopTopbar.viewMenu.togglefullscreen',
defaultMessage: 'Toggle Full Screen',
},
toggleDevTools: {
id: 'desktopTopbar.toggleDevTools',
defaultMessage: 'Toggle Developer Tools',
},
toggleWindowDevTools: {
id: 'desktopTopbar.toggleWindowDevTools',
defaultMessage: 'Toggle Window Developer Tools',
},
maximize: {
id: 'desktopTopbar.windowMenu.maximize',
defaultMessage: 'Maximize',
},
minimize: {
id: 'desktopTopbar.windowMenu.minimize',
defaultMessage: 'Minimize',
},
zoom: {
id: 'desktopTopbar.windowMenu.zoom',
defaultMessage: 'Zoom',
},
front: {
id: 'desktopTopbar.windowMenu.front',
defaultMessage: 'Front',
},
close: {
id: 'desktopTopbar.windowMenu.close',
defaultMessage: 'Close',
},
help: {
id: 'desktopTopbar.helpMenu.openHelpAndSupport',
defaultMessage: 'Open Help & Support',
},
reset: {
id: 'desktopTopbar.appMenu.resetAppAndClearData',
defaultMessage: 'Reset App & Clear Local Data',
},
about: {
id: 'desktopTopbar.appMenu.about',
defaultMessage: 'About Notion',
},
services: {
id: 'desktopTopbar.appMenu.services',
defaultMessage: 'Services',
},
hide: { id: 'desktopTopbar.appMenu.hide', defaultMessage: 'Hide Notion' },
hideOthers: {
id: 'desktopTopbar.appMenu.hideOthers',
defaultMessage: 'Hide Others',
},
unhide: {
id: 'desktopTopbar.appMenu.unhide',
defaultMessage: 'Show All',
},
quitMac: { id: 'desktopTopbar.appMenu.quit', defaultMessage: 'Quit' },
}),
escapeAmpersand = (message) => message.replace(/&/g, '&&');
__exports.setupSystemMenu = (locale) => {
const intl = localizationHelper.createIntlShape(locale),
fileMenu = {
role: 'fileMenu',
label: escapeAmpersand(intl.formatMessage(menuMessages.fileMenuTitle)),
submenu: isMac
? [
{
label: escapeAmpersand(
intl.formatMessage(menuMessages.newWindow)
),
accelerator: 'CmdOrCtrl+Shift+N',
click: () => createWindow.createWindow(),
},
...(tabsEnabled
? [
{
role: 'close',
label: escapeAmpersand(
intl.formatMessage(menuMessages.closeWindow)
),
},
]
: []),
]
: [
{
label: escapeAmpersand(
intl.formatMessage(menuMessages.newWindow)
),
accelerator: 'CmdOrCtrl+Shift+N',
click: () => createWindow.createWindow(),
},
...(tabsEnabled
? [
{
role: 'quit',
label: escapeAmpersand(
intl.formatMessage(menuMessages.quit)
),
},
]
: []),
],
},
editMenu = {
role: 'editMenu',
label: escapeAmpersand(intl.formatMessage(menuMessages.editMenuTitle)),
submenu: isMac
? [
{
role: 'undo',
label: escapeAmpersand(intl.formatMessage(menuMessages.undo)),
},
{
role: 'redo',
label: escapeAmpersand(intl.formatMessage(menuMessages.redo)),
},
{ type: 'separator' },
{
role: 'cut',
label: escapeAmpersand(intl.formatMessage(menuMessages.cut)),
},
{
role: 'copy',
label: escapeAmpersand(intl.formatMessage(menuMessages.copy)),
},
{
role: 'paste',
label: escapeAmpersand(intl.formatMessage(menuMessages.paste)),
},
{
role: 'selectAll',
label: escapeAmpersand(
intl.formatMessage(menuMessages.selectAll)
),
},
{ type: 'separator' },
{
label: escapeAmpersand(intl.formatMessage(menuMessages.speech)),
submenu: [
{
role: 'startSpeaking',
label: escapeAmpersand(
intl.formatMessage(menuMessages.startSpeaking)
),
},
{
role: 'stopSpeaking',
label: escapeAmpersand(
intl.formatMessage(menuMessages.stopSpeaking)
),
},
],
},
]
: [
{
role: 'undo',
label: escapeAmpersand(intl.formatMessage(menuMessages.undo)),
},
{
role: 'redo',
label: escapeAmpersand(intl.formatMessage(menuMessages.redo)),
},
{ type: 'separator' },
{
role: 'cut',
label: escapeAmpersand(intl.formatMessage(menuMessages.cut)),
},
{
role: 'copy',
label: escapeAmpersand(intl.formatMessage(menuMessages.copy)),
},
{
role: 'paste',
label: escapeAmpersand(intl.formatMessage(menuMessages.paste)),
},
{ type: 'separator' },
{
role: 'selectAll',
label: escapeAmpersand(
intl.formatMessage(menuMessages.selectAll)
),
},
],
},
viewMenu = {
role: 'viewMenu',
label: escapeAmpersand(intl.formatMessage(menuMessages.viewMenuTitle)),
submenu: [
{
label: escapeAmpersand(intl.formatMessage(menuMessages.reload)),
accelerator: 'CmdOrCtrl+R',
click() {
const focusedWebContents = electron.webContents.getFocusedWebContents();
if (focusedWebContents) {
if (focusedWebContents.hostWebContents) {
for (const webContentsInstance of electron.webContents.getAllWebContents()) {
if (
webContentsInstance.hostWebContents ===
focusedWebContents.hostWebContents
) {
webContentsInstance.reload();
}
}
} else {
focusedWebContents.reload();
}
}
},
},
{
label: escapeAmpersand(
intl.formatMessage(menuMessages.toggleDevTools)
),
accelerator: isMac ? 'Alt+Command+I' : 'Ctrl+Shift+I',
click() {
let focusedWebContents = electron.webContents.getFocusedWebContents();
if (focusedWebContents) {
const focusedWebContentsUrl = focusedWebContents.getURL();
if (
focusedWebContentsUrl.startsWith('file://') &&
focusedWebContentsUrl.endsWith('/search.html')
) {
const notionWebviewWebContents = electron.webContents
.getAllWebContents()
.find(
(webContentsInstance) =>
webContentsInstance.hostWebContents ===
focusedWebContents.hostWebContents &&
webContentsInstance !== focusedWebContents
);
if (notionWebviewWebContents) {
focusedWebContents = notionWebviewWebContents;
}
}
focusedWebContents.toggleDevTools();
}
},
},
{
label: escapeAmpersand(
intl.formatMessage(menuMessages.toggleWindowDevTools)
),
accelerator: isMac ? 'Shift+Alt+Command+I' : 'Alt+Ctrl+Shift+I',
visible: false,
click(menuItem, focusedWindow) {
if (focusedWindow) {
focusedWindow.webContents.toggleDevTools();
}
},
},
{ type: 'separator' },
{
role: 'togglefullscreen',
label: escapeAmpersand(
intl.formatMessage(menuMessages.togglefullscreen)
),
},
],
},
windowMenu = {
role: 'windowMenu',
label: escapeAmpersand(
intl.formatMessage(menuMessages.windowMenuTitle)
),
submenu: isMac
? [
{
role: 'minimize',
label: escapeAmpersand(
intl.formatMessage(menuMessages.minimize)
),
},
{
role: 'zoom',
label: escapeAmpersand(intl.formatMessage(menuMessages.zoom)),
},
{ type: 'separator' },
{
role: 'front',
label: escapeAmpersand(intl.formatMessage(menuMessages.front)),
},
]
: [
{
role: 'minimize',
label: escapeAmpersand(
intl.formatMessage(menuMessages.minimize)
),
},
{
label: escapeAmpersand(
intl.formatMessage(menuMessages.maximize)
),
click(item, focusedWindow) {
if (focusedWindow) {
if (focusedWindow.isMaximized()) {
focusedWindow.unmaximize();
} else {
focusedWindow.maximize();
}
}
},
},
...(tabsEnabled
? [
{
role: 'close',
label: escapeAmpersand(
intl.formatMessage(menuMessages.close)
),
},
]
: []),
],
},
helpMenu = {
role: 'help',
label: escapeAmpersand(intl.formatMessage(menuMessages.helpTitle)),
submenu: [
{
label: escapeAmpersand(intl.formatMessage(menuMessages.help)),
click() {
electron.shell.openExternal(config.default.baseURL + '/help');
},
},
],
},
appMenu = {
role: 'appMenu',
submenu: [
{
role: 'about',
label: escapeAmpersand(intl.formatMessage(menuMessages.about)),
},
{ type: 'separator' },
{
label: escapeAmpersand(intl.formatMessage(menuMessages.reset)),
async click(item, focusedWindow) {
await fs.remove(electron.app.getPath('userData'));
electron.app.relaunch();
electron.app.exit();
},
},
{ type: 'separator' },
{
role: 'services',
label: escapeAmpersand(intl.formatMessage(menuMessages.services)),
},
{ type: 'separator' },
{
role: 'hide',
label: escapeAmpersand(intl.formatMessage(menuMessages.hide)),
},
{
role: 'hideOthers',
label: escapeAmpersand(intl.formatMessage(menuMessages.hideOthers)),
},
{
role: 'unhide',
label: escapeAmpersand(intl.formatMessage(menuMessages.unhide)),
},
...(tabsEnabled
? [
{ type: 'separator' },
{
role: 'quit',
label: escapeAmpersand(
intl.formatMessage(menuMessages.quitMac)
),
},
]
: []),
],
},
template = [fileMenu, editMenu, viewMenu, windowMenu, helpMenu];
if (isMac) template.unshift(appMenu);
const menu = electron.Menu.buildFromTemplate(template);
electron.Menu.setApplicationMenu(menu);
};
};

View File

@ -1,196 +0,0 @@
/*
* notion-enhancer
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* under the MIT license
*/
@import './css/buttons.css';
* {
box-sizing: border-box;
word-break: break-word;
text-decoration: none;
text-size-adjust: 100%;
font-family: var(--theme--font_sans) !important;
outline-color: var(--theme--table-border);
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
@keyframes tabSlide {
from {
width: 0;
}
to {
width: 8.5em;
}
}
body:not(.error)::after {
z-index: 1;
content: '';
position: absolute;
left: calc(50% - 15px);
top: calc(50% + 10px);
width: 18px;
height: 18px;
opacity: 0.5;
border: 4px solid var(--theme--text);
border-top-color: transparent;
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
html,
body,
#root {
background: var(--theme--main) !important;
position: relative;
height: 100%;
margin: 0;
}
#root {
display: flex;
flex-direction: column;
}
[data-platform='darwin'] #titlebar {
padding-left: 4em;
}
#titlebar::before {
content: '';
position: absolute;
width: 100%;
-webkit-app-region: no-drag;
top: 0;
left: 0;
height: 2px;
}
#titlebar {
display: flex;
flex-shrink: 1;
user-select: none;
-webkit-app-region: drag;
background: var(--theme--dragarea);
}
#titlebar button {
color: var(--theme--text);
-webkit-app-region: no-drag;
border: none;
background: transparent;
}
#titlebar .window-buttons-area {
margin: 0.5em 0.55em 0.5em auto;
}
#titlebar .window-buttons-area:empty {
display: none;
}
#open-enhancer-menu::before {
content: '';
height: 1.25em;
width: 1.25em;
display: inline-block;
margin: auto 1em -0.25em 1em;
background-size: contain;
background-image: url('enhancement://core/icons/mac+linux.png');
background-repeat: no-repeat;
}
#tabs {
margin-top: auto;
flex-wrap: wrap;
display: flex;
align-items: center;
}
#tabs .tab:not(.new):not(.current) {
flex: 1 1 30px;
min-width: 30px;
}
#tabs button:nth-child(16) {
display: none;
opacity: 0;
}
#tabs .tab {
display: inline-flex;
background: var(--theme--main);
border: none;
font-size: 1.15em;
padding: 0.2em 0.4em;
text-align: left;
border-bottom: 0.22em solid var(--theme--table-border);
opacity: 0.8;
}
#tabs .tab img {
object-fit: cover;
height: 1em;
width: 1em;
border-radius: 3px;
margin: 0 0.5em -0.16em 0.1em;
}
#tabs .tab:not(.new) {
margin-top: 0.5em;
}
#tabs .tab:not(.new) span:not(.close) {
width: 8.5em;
margin-right: 0.22em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
#tabs .tab.slideIn span:not(.close) {
animation: tabSlide 100ms ease-in-out;
}
#tabs .tab.slideOut {
width: 0;
animation: tabSlide 100ms ease-in-out reverse;
}
#tabs .tab .close {
padding: 0 0.35em 0.1em 0.3em;
margin-left: auto;
font-weight: bold;
}
#tabs .tab.current {
opacity: 1;
background: var(--theme--selected);
border-bottom: 0.22em solid var(--theme--option_active-background);
}
#tabs .tab.new {
background: none;
border: none;
margin-left: -0.1em;
margin-top: 0.3em;
}
#tabs .tab.new span {
padding: 0 0.35em 0.1em 0.3em;
font-weight: bold;
}
#tabs .tab:hover {
opacity: 1;
}
#tabs .tab .close:hover,
#tabs .tab.new span:hover,
#titlebar .window-button:hover {
border-radius: 0.22em;
background: var(--theme--table-border);
box-shadow: 0 0 0 0.5px var(--theme--interactive_hover-border);
}
#titlebar .window-button.btn-close:hover {
background: var(--theme--button_close);
color: var(--theme--button_close-fill);
}
#tabs .tab.dragged-over {
box-shadow: inset 0.22em 0 0 0 var(--theme--selected);
}
.notion {
z-index: 2;
width: 100%;
height: 100%;
display: none;
}

View File

@ -1,261 +0,0 @@
/*
* notion-enhancer
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 TarasokUA
* under the MIT license
*/
'use strict';
let tray, enhancer_menu;
module.exports = (store, __exports) => {
const electron = require('electron'),
path = require('path'),
is_mac = process.platform === 'darwin',
is_win = process.platform === 'win32',
helpers = require('../../pkg/helpers.js'),
getAllWindows = electron.BrowserWindow.getAllWindows;
function newWindow() {
require('./createWindow.js')(
store,
require(path.resolve(
`${helpers.getNotionResources()}/app/main/createWindow.js`
))
)(
'',
getAllWindows().find((win) => win !== enhancer_menu)
);
}
electron.app.on('second-instance', (event, args, workingDirectory) => {
const windows = getAllWindows();
if (windows.some((win) => win.isVisible())) {
newWindow();
} else {
windows.forEach((window) => {
window.show();
window.focus();
if (store().maximized) window.maximize();
});
}
});
electron.app.once('ready', () => {
// tray
tray = new electron.Tray(
is_win
? path.resolve(`${__dirname}/icons/windows.ico`)
: new electron.nativeImage.createFromPath(
path.resolve(`${__dirname}/icons/mac+linux.png`)
).resize({
width: 16,
height: 16,
})
);
// menu
electron.ipcMain.on('enhancer:open-menu', openEnhancerMenu);
electron.ipcMain.on('enhancer:set-app-theme', (event, arg) => {
electron.webContents
.getAllWebContents()
.forEach((webContents) =>
webContents.send('enhancer:set-app-theme', arg)
);
});
electron.ipcMain.on('enhancer:get-app-theme', (event, arg) => {
electron.webContents
.getAllWebContents()
.forEach((webContents) =>
webContents.send('enhancer:get-app-theme', arg)
);
});
electron.ipcMain.on('enhancer:close-tab', (event, target, tab) => {
electron.webContents
.fromId(target)
.webContents.send('enhancer:close-tab', tab);
});
function calculateWindowPos(width, height) {
const screen = electron.screen.getDisplayNearestPoint({
x: tray.getBounds().x,
y: tray.getBounds().y,
});
// left
if (screen.workArea.x > 0)
return {
x: screen.workArea.x,
y: screen.workArea.height - height,
};
// top
if (screen.workArea.y > 0)
return {
x: Math.round(
tray.getBounds().x + tray.getBounds().width / 2 - width / 2
),
y: screen.workArea.y,
};
// right
if (screen.workArea.width < screen.bounds.width)
return {
x: screen.workArea.width - width,
y: screen.bounds.height - height,
};
// bottom
return {
x: Math.round(
tray.getBounds().x + tray.getBounds().width / 2 - width / 2
),
y: screen.workArea.height - height,
};
}
function openEnhancerMenu() {
if (enhancer_menu) return enhancer_menu.show();
const window_state = require(`${helpers
.getNotionResources()
.replace(/\\/g, '/')}/app/node_modules/electron-window-state/index.js`)(
{
file: 'menu.windowstate.json',
path: helpers.__data,
defaultWidth: 275,
defaultHeight: 600,
}
);
enhancer_menu = new electron.BrowserWindow({
show: true,
frame: !store().frameless,
titleBarStyle: 'hiddenInset',
x:
window_state.x ||
calculateWindowPos(window_state.width, window_state.height).x,
y:
window_state.y ||
calculateWindowPos(window_state.width, window_state.height).y,
width: window_state.width,
height: window_state.height,
webPreferences: {
preload: path.resolve(`${__dirname}/enhancerMenu.js`),
nodeIntegration: true,
session: electron.session.fromPartition('persist:notion'),
enableRemoteModule: true,
},
});
enhancer_menu.loadURL('enhancement://core/menu.html');
enhancer_menu.on('close', (e) => {
window_state.saveState(enhancer_menu);
enhancer_menu = null;
});
// enhancer_menu.webContents.openDevTools();
}
// tray
const contextMenu = electron.Menu.buildFromTemplate([
{
type: 'normal',
label: 'GitHub',
click: () => {
electron.shell.openExternal(
'https://github.com/notion-enhancer/notion-enhancer/blob/master/DOCUMENTATION.md'
);
},
},
{
type: 'normal',
label: 'Discord',
click: () => {
electron.shell.openExternal('https://discord.gg/sFWPXtA');
},
},
{
type: 'separator',
},
{
type: 'normal',
label: 'Bug Report',
click: () => {
electron.shell.openExternal(
'https://github.com/notion-enhancer/notion-enhancer/issues/new?labels=bug&template=bug-report.md'
);
},
},
{
type: 'normal',
label: 'Feature Proposal',
click: () => {
electron.shell.openExternal(
'https://github.com/notion-enhancer/notion-enhancer/issues/new?labels=enhancement&template=feature-proposal.md'
);
},
},
{
type: 'separator',
},
{
type: 'normal',
label: 'Enhancements',
accelerator: store().menu_toggle,
click: openEnhancerMenu,
},
{
type: 'normal',
label: 'New Window',
click: newWindow(),
accelerator: 'CommandOrControl+Shift+N',
},
{
type: 'normal',
label: 'Toggle Visibility',
accelerator: store().hotkey,
click: toggleWindows,
},
{
type: 'separator',
},
{
label: 'Relaunch',
click: () => {
electron.app.relaunch();
electron.app.quit();
},
},
{
label: 'Quit',
role: 'quit',
},
]);
tray.setContextMenu(contextMenu);
tray.setToolTip('Notion');
// hotkey
function showWindows(windows) {
if (is_mac) electron.app.show();
if (store().maximized) windows.forEach((win) => [win.maximize()]);
else windows.forEach((win) => win.show());
electron.app.focus({ steal: true });
}
function hideWindows(windows) {
windows.forEach((win) => [win.isFocused() && win.blur(), win.hide()]);
if (is_mac) electron.app.hide();
}
function toggleWindows() {
const windows = getAllWindows();
if (windows.some((win) => win.isVisible())) hideWindows(windows);
else showWindows(windows);
}
tray.on('click', toggleWindows);
if (store().hotkey) {
electron.globalShortcut.register(store().hotkey, () => {
const windows = getAllWindows();
if (windows.some((win) => win.isFocused() && win.isVisible()))
hideWindows(windows);
else showWindows(windows);
});
}
});
};

View File

@ -1,716 +0,0 @@
/*
* notion-enhancer
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 TarasokUA
* (c) 2020 Arecsu
* (c) 2020 u/zenith_illinois
* (c) 2020 admiraldus (https://github.com/admiraldus)
* under the MIT license
*/
:root {
/** dark **/
--theme_dark--main: rgb(47, 52, 55);
--theme_dark--sidebar: rgb(55, 60, 63);
--theme_dark--overlay: rgba(15, 15, 15, 0.6);
--theme_dark--dragarea: #272d2f;
--theme_dark--box-shadow: rgba(15, 15, 15, 0.2) 0px 0px 0px 1px,
rgba(15, 15, 15, 0.2) 0px 2px 4px;
--theme_dark--box-shadow_strong: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px,
rgba(15, 15, 15, 0.2) 0px 3px 6px, rgba(15, 15, 15, 0.4) 0px 9px 24px;
--theme_dark--page_normal-width: 900px;
--theme_dark--page_full-width: 100%;
--theme_dark--page-padding: calc(96px + env(safe-area-inset-left));
--theme_dark--page_banner-height: 30vh;
--theme_dark--preview-width: 977px;
--theme_dark--preview-padding: 8rem;
--theme_dark--preview_banner-height: 20vh;
--theme_dark--font_sans: -apple-system, BlinkMacSystemFont, 'Segoe UI',
Helvetica, 'Apple Color Emoji', Arial, sans-serif, 'Segoe UI Emoji',
'Segoe UI Symbol';
--theme_dark--font_serif: Lyon-Text, Georgia, YuMincho, 'Yu Mincho',
'Hiragino Mincho ProN', 'Hiragino Mincho Pro', 'Songti TC', 'Songti SC',
SimSun, 'Nanum Myeongjo', NanumMyeongjo, Batang, serif;
--theme_dark--font_mono: iawriter-mono, Nitti, Menlo, Courier, monospace;
--theme_dark--font_code: SFMono-Regular, Consolas, 'Liberation Mono', Menlo,
Courier, monospace;
--theme_dark--font_quote: var(--theme_dark--font_sans);
--theme_dark--font_title-size: 40px;
--theme_dark--font_heading1-size: 1.875em;
--theme_dark--font_heading2-size: 1.5em;
--theme_dark--font_heading3-size: 1.25em;
--theme_dark--font_label-size: 14px;
--theme_dark--font_body-size: 16px;
--theme_dark--font_body-size_small: 14px;
--theme_dark--font_code-size: 0.796875em;
--theme_dark--font_sidebar-size: 14px;
--theme_dark--text-block_line-height: 1.5;
--theme_dark--text-block_margin-top: 1px;
--theme_dark--scrollbar: #505457;
--theme_dark--scrollbar-border: transparent;
--theme_dark--scrollbar_hover: #696d6f;
--theme_dark--card: rgb(63, 68, 71);
--theme_dark--gallery: rgba(255, 255, 255, 0.05);
--theme_dark--select_input: rgb(55, 60, 63);
--theme_dark--table-border: rgba(255, 255, 255, 0.1);
--theme_dark--ui-border: rgba(255, 255, 255, 0.07);
--theme_dark--interactive_hover: rgb(71, 76, 80);
--theme_dark--interactive_hover-border: transparent;
--theme_dark--button_close: #e81123;
--theme_dark--button_close-fill: white;
--theme_dark--selected: rgba(46, 170, 220, 0.2);
--theme_dark--primary: rgb(46, 170, 220);
--theme_dark--primary_hover: rgb(6, 156, 205);
--theme_dark--primary_click: rgb(0, 141, 190);
--theme_dark--primary_indicator: rgb(235, 87, 87);
--theme_dark--option-color: white;
--theme_dark--option-background: transparent;
--theme_dark--option_active-color: white;
--theme_dark--option_active-background: var(--theme_dark--primary);
--theme_dark--option_hover-color: white;
--theme_dark--option_hover-background: rgb(71, 76, 80);
--theme_dark--danger_text: rgb(235, 87, 87);
--theme_dark--danger_border: rgba(235, 87, 87, 0.5);
--theme_dark--text: rgba(255, 255, 255, 0.9);
--theme_dark--text_ui: rgba(255, 255, 255, 0.6);
--theme_dark--text_ui_info: rgba(255, 255, 255, 0.4);
--theme_dark--text_gray: rgba(151, 154, 155, 0.95);
--theme_dark--text_brown: rgb(147, 114, 100);
--theme_dark--text_orange: rgb(255, 163, 68);
--theme_dark--text_yellow: rgb(255, 220, 73);
--theme_dark--text_green: rgb(77, 171, 154);
--theme_dark--text_blue: rgb(82, 156, 202);
--theme_dark--text_purple: rgb(154, 109, 215);
--theme_dark--text_pink: rgb(226, 85, 161);
--theme_dark--text_red: rgb(255, 115, 105);
--theme_dark--bg-text: var(--theme_dark--text);
--theme_dark--bg_gray: rgb(69, 75, 78);
--theme_dark--bg_gray-text: var(--theme_dark--bg-text);
--theme_dark--bg_brown: rgb(67, 64, 64);
--theme_dark--bg_brown-text: var(--theme_dark--bg-text);
--theme_dark--bg_orange: rgb(89, 74, 58);
--theme_dark--bg_orange-text: var(--theme_dark--bg-text);
--theme_dark--bg_yellow: rgb(89, 86, 59);
--theme_dark--bg_yellow-text: var(--theme_dark--bg-text);
--theme_dark--bg_green: rgb(53, 76, 75);
--theme_dark--bg_green-text: var(--theme_dark--bg-text);
--theme_dark--bg_blue: rgb(54, 73, 84);
--theme_dark--bg_blue-text: var(--theme_dark--bg-text);
--theme_dark--bg_purple: rgb(68, 63, 87);
--theme_dark--bg_purple-text: var(--theme_dark--bg-text);
--theme_dark--bg_pink: rgb(83, 59, 76);
--theme_dark--bg_pink-text: var(--theme_dark--bg-text);
--theme_dark--bg_red: rgb(89, 65, 65);
--theme_dark--bg_red-text: var(--theme_dark--bg-text);
--theme_dark--line-text: var(--theme_dark--text);
--theme_dark--line_gray: rgb(69, 75, 78);
--theme_dark--line_gray-text: var(--theme_dark--line-text);
--theme_dark--line_brown: rgb(67, 64, 64);
--theme_dark--line_brown-text: var(--theme_dark--line-text);
--theme_dark--line_orange: rgb(89, 74, 58);
--theme_dark--line_orange-text: var(--theme_dark--line-text);
--theme_dark--line_yellow: rgb(89, 86, 59);
--theme_dark--line_yellow-text: var(--theme_dark--line-text);
--theme_dark--line_green: rgb(53, 76, 75);
--theme_dark--line_green-text: var(--theme_dark--line-text);
--theme_dark--line_blue: rgb(54, 73, 84);
--theme_dark--line_blue-text: var(--theme_dark--line-text);
--theme_dark--line_purple: rgb(68, 63, 87);
--theme_dark--line_purple-text: var(--theme_dark--line-text);
--theme_dark--line_pink: rgb(83, 59, 76);
--theme_dark--line_pink-text: var(--theme_dark--line-text);
--theme_dark--line_red: rgb(89, 65, 65);
--theme_dark--line_red-text: var(--theme_dark--line-text);
--theme_dark--select-text: var(--theme_dark--text);
--theme_dark--select_gray: rgba(151, 154, 155, 0.5);
--theme_dark--select_gray-text: var(--theme_dark--select-text);
--theme_dark--select_brown: rgba(147, 114, 100, 0.5);
--theme_dark--select_brown-text: var(--theme_dark--select-text);
--theme_dark--select_orange: rgba(255, 163, 68, 0.5);
--theme_dark--select_orange-text: var(--theme_dark--select-text);
--theme_dark--select_yellow: rgba(255, 220, 73, 0.5);
--theme_dark--select_yellow-text: var(--theme_dark--select-text);
--theme_dark--select_green: rgba(77, 171, 154, 0.5);
--theme_dark--select_green-text: var(--theme_dark--select-text);
--theme_dark--select_blue: rgba(82, 156, 202, 0.5);
--theme_dark--select_blue-text: var(--theme_dark--select-text);
--theme_dark--select_purple: rgba(154, 109, 215, 0.5);
--theme_dark--select_purple-text: var(--theme_dark--select-text);
--theme_dark--select_pink: rgba(226, 85, 161, 0.5);
--theme_dark--select_pink-text: var(--theme_dark--select-text);
--theme_dark--select_red: rgba(255, 115, 105, 0.5);
--theme_dark--select_red-text: var(--theme_dark--select-text);
--theme_dark--callout-text: var(--theme_dark--text);
--theme_dark--callout_gray: rgba(69, 75, 78, 0.3);
--theme_dark--callout_gray-text: var(--theme_dark--callout-text);
--theme_dark--callout_brown: rgba(67, 64, 64, 0.3);
--theme_dark--callout_brown-text: var(--theme_dark--callout-text);
--theme_dark--callout_orange: rgba(89, 74, 58, 0.3);
--theme_dark--callout_orange-text: var(--theme_dark--callout-text);
--theme_dark--callout_yellow: rgba(89, 86, 59, 0.3);
--theme_dark--callout_yellow-text: var(--theme_dark--callout-text);
--theme_dark--callout_green: rgba(53, 76, 75, 0.3);
--theme_dark--callout_green-text: var(--theme_dark--callout-text);
--theme_dark--callout_blue: rgba(54, 73, 84, 0.3);
--theme_dark--callout_blue-text: var(--theme_dark--callout-text);
--theme_dark--callout_purple: rgba(68, 63, 87, 0.3);
--theme_dark--callout_purple-text: var(--theme_dark--callout-text);
--theme_dark--callout_pink: rgba(83, 59, 76, 0.3);
--theme_dark--callout_pink-text: var(--theme_dark--callout-text);
--theme_dark--callout_red: rgba(89, 65, 65, 0.3);
--theme_dark--callout_red-text: var(--theme_dark--callout-text);
--theme_dark--code_inline-text: #eb5757;
--theme_dark--code_inline-background: rgba(135, 131, 120, 0.15);
--theme_dark--code-text: var(--theme_dark--text);
--theme_dark--code-background: var(--theme_dark--card);
--theme_dark--code_function: rgba(255, 255, 255, 0.9);
--theme_dark--code_keyword: hsl(350, 40%, 70%);
--theme_dark--code_tag: hsl(350, 40%, 70%);
--theme_dark--code_operator: hsl(40, 90%, 60%);
--theme_dark--code_important: #e90;
--theme_dark--code_property: hsl(350, 40%, 70%);
--theme_dark--code_builtin: hsl(75, 70%, 60%);
--theme_dark--code_attr-name: hsl(75, 70%, 60%);
--theme_dark--code_comment: hsl(30, 20%, 50%);
--theme_dark--code_punctuation: rgba(255, 255, 255, 0.9);
--theme_dark--code_doctype: hsl(30, 20%, 50%);
--theme_dark--code_number: hsl(350, 40%, 70%);
--theme_dark--code_string: hsl(75, 70%, 60%);
--theme_dark--code_attr-value: hsl(350, 40%, 70%);
/** light **/
--theme_light--main: white;
--theme_light--sidebar: rgb(247, 246, 243);
--theme_light--overlay: rgba(15, 15, 15, 0.6);
--theme_light--dragarea: rgba(55, 53, 47, 0.04);
--theme_light--box-shadow: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px,
rgba(15, 15, 15, 0.1) 0px 2px 4px;
--theme_light--box-shadow_strong: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px,
rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;
--theme_light--page_normal-width: 900px;
--theme_light--page_full-width: 100%;
--theme_light--page-padding: calc(96px + env(safe-area-inset-left));
--theme_light--page_banner-height: 30vh;
--theme_light--preview-width: 977px;
--theme_light--preview-padding: 8rem;
--theme_light--preview_banner-height: 20vh;
--theme_light--font_sans: -apple-system, BlinkMacSystemFont, 'Segoe UI',
Helvetica, 'Apple Color Emoji', Arial, sans-serif, 'Segoe UI Emoji',
'Segoe UI Symbol';
--theme_light--font_serif: Lyon-Text, Georgia, YuMincho, 'Yu Mincho',
'Hiragino Mincho ProN', 'Hiragino Mincho Pro', 'Songti TC', 'Songti SC',
SimSun, 'Nanum Myeongjo', NanumMyeongjo, Batang, serif;
--theme_light--font_mono: iawriter-mono, Nitti, Menlo, Courier, monospace;
--theme_light--font_code: SFMono-Regular, Consolas, 'Liberation Mono', Menlo,
Courier, monospace;
--theme_light--font_quote: var(--theme_light--font_sans);
--theme_light--font_title-size: 40px;
--theme_light--font_heading1-size: 1.875em;
--theme_light--font_heading2-size: 1.5em;
--theme_light--font_heading3-size: 1.25em;
--theme_light--font_label-size: 14px;
--theme_light--font_body-size: 16px;
--theme_light--font_body-size_small: 14px;
--theme_light--font_code-size: 0.796875em;
--theme_light--font_sidebar-size: 14px;
--theme_light--text-block_line-height: 1.5;
--theme_light--text-block_margin-top: 1px;
--theme_light--scrollbar: #d9d8d6;
--theme_light--scrollbar-border: #cacac8;
--theme_light--scrollbar_hover: #cacac8;
--theme_light--card: rgb(247, 247, 247);
--theme_light--gallery: rgba(55, 53, 47, 0.024);
--theme_light--select_input: rgba(242, 241, 238, 0.6);
--theme_light--table-border: rgba(55, 53, 47, 0.16);
--theme_light--ui-border: rgba(55, 53, 47, 0.09);
--theme_light--interactive_hover: rgb(239, 239, 239);
--theme_light--interactive_hover-border: transparent;
--theme_light--button_close: #e81123;
--theme_light--button_close-fill: white;
--theme_light--selected: rgba(46, 170, 220, 0.2);
--theme_light--primary: rgb(46, 170, 220);
--theme_light--primary_hover: rgb(6, 156, 205);
--theme_light--primary_click: rgb(0, 141, 190);
--theme_light--primary_indicator: rgb(235, 87, 87);
--theme_light--option-color: black;
--theme_light--option-background: transparent;
--theme_light--option_hover-color: black;
--theme_light--option_hover-background: rgba(55, 53, 47, 0.08);
--theme_light--option_active-color: white;
--theme_light--option_active-background: var(--theme_light--primary);
--theme_light--danger_text: rgb(235, 87, 87);
--theme_light--danger_border: rgba(235, 87, 87, 0.5);
--theme_light--text: rgb(55, 53, 47);
--theme_light--text_ui: rgba(55, 53, 47, 0.6);
--theme_light--text_ui: rgba(55, 53, 47, 0.6);
--theme_light--text_ui_info: rgba(55, 53, 47, 0.4);
--theme_light--text_gray: rgb(155, 154, 151);
--theme_light--text_brown: rgb(100, 71, 58);
--theme_light--text_orange: rgb(217, 115, 13);
--theme_light--text_yellow: rgb(223, 171, 1);
--theme_light--text_green: rgb(15, 123, 108);
--theme_light--text_blue: rgb(11, 110, 153);
--theme_light--text_purple: rgb(105, 64, 165);
--theme_light--text_pink: rgb(173, 26, 114);
--theme_light--text_red: rgb(224, 62, 62);
--theme_light--bg-text: var(--theme_light--text);
--theme_light--bg_gray: rgb(235, 236, 237);
--theme_light--bg_gray-text: var(--theme_light--bg-text);
--theme_light--bg_brown: rgb(233, 229, 227);
--theme_light--bg_brown-text: var(--theme_light--bg-text);
--theme_light--bg_orange: rgb(250, 235, 221);
--theme_light--bg_orange-text: var(--theme_light--bg-text);
--theme_light--bg_yellow: rgb(251, 243, 219);
--theme_light--bg_yellow-text: var(--theme_light--bg-text);
--theme_light--bg_green: rgb(221, 237, 234);
--theme_light--bg_green-text: var(--theme_light--bg-text);
--theme_light--bg_blue: rgb(221, 235, 241);
--theme_light--bg_blue-text: var(--theme_light--bg-text);
--theme_light--bg_purple: rgb(234, 228, 242);
--theme_light--bg_purple-text: var(--theme_light--bg-text);
--theme_light--bg_pink: rgb(244, 223, 235);
--theme_light--bg_pink-text: var(--theme_light--bg-text);
--theme_light--bg_red: rgb(251, 228, 228);
--theme_light--bg_red-text: var(--theme_light--bg-text);
--theme_light--line-text: var(--theme_light--text);
--theme_light--line_gray: rgb(235, 236, 237);
--theme_light--line_gray-text: var(--theme_light--line-text);
--theme_light--line_brown: rgb(233, 229, 227);
--theme_light--line_brown-text: var(--theme_light--line-text);
--theme_light--line_orange: rgb(250, 235, 221);
--theme_light--line_orange-text: var(--theme_light--line-text);
--theme_light--line_yellow: rgb(251, 243, 219);
--theme_light--line_yellow-text: var(--theme_light--line-text);
--theme_light--line_green: rgb(221, 237, 234);
--theme_light--line_green-text: var(--theme_light--line-text);
--theme_light--line_blue: rgb(221, 235, 241);
--theme_light--line_blue-text: var(--theme_light--line-text);
--theme_light--line_purple: rgb(234, 228, 242);
--theme_light--line_purple-text: var(--theme_light--line-text);
--theme_light--line_pink: rgb(244, 223, 235);
--theme_light--line_pink-text: var(--theme_light--line-text);
--theme_light--line_red: rgb(251, 228, 228);
--theme_light--line_red-text: var(--theme_light--line-text);
--theme_light--select-text: var(--theme_light--text);
--theme_light--select_gray: rgba(140, 46, 0, 0.2);
--theme_light--select_gray-text: var(--theme_light--select-text);
--theme_light--select_brown: rgba(140, 46, 0, 0.2);
--theme_light--select_brown-text: var(--theme_light--select-text);
--theme_light--select_orange: rgba(245, 93, 0, 0.2);
--theme_light--select_orange-text: var(--theme_light--select-text);
--theme_light--select_yellow: rgba(233, 168, 0, 0.2);
--theme_light--select_yellow-text: var(--theme_light--select-text);
--theme_light--select_green: rgba(0, 135, 107, 0.2);
--theme_light--select_green-text: var(--theme_light--select-text);
--theme_light--select_blue: rgba(0, 120, 223, 0.2);
--theme_light--select_blue-text: var(--theme_light--select-text);
--theme_light--select_purple: rgba(103, 36, 222, 0.2);
--theme_light--select_purple-text: var(--theme_light--select-text);
--theme_light--select_pink: rgba(221, 0, 129, 0.2);
--theme_light--select_pink-text: var(--theme_light--select-text);
--theme_light--select_red: rgba(255, 0, 26, 0.2);
--theme_light--select_red-text: var(--theme_light--select-text);
--theme_light--callout-text: var(--theme_light--text);
--theme_light--callout_gray: rgba(235, 236, 237, 0.3);
--theme_light--callout_gray-text: var(--theme_light--callout-text);
--theme_light--callout_brown: rgba(233, 229, 227, 0.3);
--theme_light--callout_brown-text: var(--theme_light--callout-text);
--theme_light--callout_orange: rgba(250, 235, 221, 0.3);
--theme_light--callout_orange-text: var(--theme_light--callout-text);
--theme_light--callout_yellow: rgba(251, 243, 219, 0.3);
--theme_light--callout_yellow-text: var(--theme_light--callout-text);
--theme_light--callout_green: rgba(221, 237, 234, 0.3);
--theme_light--callout_green-text: var(--theme_light--callout-text);
--theme_light--callout_blue: rgba(221, 235, 241, 0.3);
--theme_light--callout_blue-text: var(--theme_light--callout-text);
--theme_light--callout_purple: rgba(234, 228, 242, 0.3);
--theme_light--callout_purple-text: var(--theme_light--callout-text);
--theme_light--callout_pink: rgba(244, 223, 235, 0.3);
--theme_light--callout_pink-text: var(--theme_light--callout-text);
--theme_light--callout_red: rgba(251, 228, 228, 0.3);
--theme_light--callout_red-text: var(--theme_light--callout-text);
--theme_light--code_inline-text: #eb5757;
--theme_light--code_inline-background: rgba(135, 131, 120, 0.15);
--theme_light--code-text: var(--theme_light--text);
--theme_light--code-background: var(--theme_light--card);
--theme_light--code_function: #dd4a68;
--theme_light--code_keyword: #07a;
--theme_light--code_tag: #905;
--theme_light--code_operator: #9a6e3a;
--theme_light--code_important: #e90;
--theme_light--code_property: #905;
--theme_light--code_builtin: #690;
--theme_light--code_attr-name: #690;
--theme_light--code_comment: slategray;
--theme_light--code_punctuation: #999;
--theme_light--code_doctype: slategray;
--theme_light--code_number: #905;
--theme_light--code_string: #690;
--theme_light--code_attr-value: #07a;
}
.notion-dark-theme {
--theme--main: var(--theme_dark--main);
--theme--sidebar: var(--theme_dark--sidebar);
--theme--overlay: var(--theme_dark--overlay);
--theme--dragarea: var(--theme_dark--dragarea);
--theme--box-shadow: var(--theme_dark--box-shadow);
--theme--box-shadow_strong: var(--theme_dark--box-shadow_strong);
--theme--page_normal-width: var(--theme_dark--page_normal-width);
--theme--page_full-width: var(--theme_dark--page_full-width);
--theme--page-padding: var(--theme_dark--page-padding);
--theme--page_banner-height: var(--theme_dark--page_banner-height);
--theme--preview-width: var(--theme_dark--preview-width);
--theme--preview-padding: var(--theme_dark--preview-padding);
--theme--preview_banner-height: var(--theme_dark--preview_banner-height);
--theme--font_sans: var(--theme_dark--font_sans);
--theme--font_serif: var(--theme_dark--font_serif);
--theme--font_mono: var(--theme_dark--font_mono);
--theme--font_code: var(--theme_dark--font_code);
--theme--font_quote: var(--theme_dark--font_sans);
--theme--font_title-size: var(--theme_dark--font_title-size);
--theme--font_heading1-size: var(--theme_dark--font_heading1-size);
--theme--font_heading2-size: var(--theme_dark--font_heading2-size);
--theme--font_heading3-size: var(--theme_dark--font_heading3-size);
--theme--font_label-size: var(--theme_dark--font_label-size);
--theme--font_body-size: var(--theme_dark--font_body-size);
--theme--font_body-size_small: var(--theme_dark--font_body-size_small);
--theme--font_code-size: var(--theme_dark--font_code-size);
--theme--font_sidebar-size: var(--theme_dark--font_sidebar-size);
--theme--text-block_line-height: var(--theme_dark--text-block_line-height);
--theme--text-block_margin-top: var(--theme_dark--text-block_margin-top);
--theme--scrollbar: var(--theme_dark--scrollbar);
--theme--scrollbar-border: var(--theme_dark--scrollbar-border);
--theme--scrollbar_hover: var(--theme_dark--scrollbar_hover);
--theme--card: var(--theme_dark--card);
--theme--gallery: var(--theme_dark--gallery);
--theme--select_input: var(--theme_dark--select_input);
--theme--table-border: var(--theme_dark--table-border);
--theme--ui-border: var(--theme_dark--ui-border);
--theme--interactive_hover: var(--theme_dark--interactive_hover);
--theme--interactive_hover-border: var(
--theme_dark--interactive_hover-border
);
--theme--button_close: var(--theme_dark--button_close);
--theme--button_close-fill: var(--theme_dark--button_close-fill);
--theme--selected: var(--theme_dark--selected);
--theme--primary: var(--theme_dark--primary);
--theme--primary_hover: var(--theme_dark--primary_hover);
--theme--primary_click: var(--theme_dark--primary_click);
--theme--primary_indicator: var(--theme_dark--primary_indicator);
--theme--option-color: var(--theme_dark--option-color);
--theme--option-background: var(--theme_dark--option-background);
--theme--option_active-color: var(--theme_dark--option_active-color);
--theme--option_active-background: var(
--theme_dark--option_active-background
);
--theme--option_hover-color: var(--theme_dark--option_hover-color);
--theme--option_hover-background: var(--theme_dark--option_hover-background);
--theme--danger_text: var(--theme_dark--danger_text);
--theme--danger_border: var(--theme_dark--danger_border);
--theme--text: var(--theme_dark--text);
--theme--text_ui: var(--theme_dark--text_ui);
--theme--text_ui_info: var(--theme_dark--text_ui_info);
--theme--text_gray: var(--theme_dark--text_gray);
--theme--text_brown: var(--theme_dark--text_brown);
--theme--text_orange: var(--theme_dark--text_orange);
--theme--text_yellow: var(--theme_dark--text_yellow);
--theme--text_green: var(--theme_dark--text_green);
--theme--text_blue: var(--theme_dark--text_blue);
--theme--text_purple: var(--theme_dark--text_purple);
--theme--text_pink: var(--theme_dark--text_pink);
--theme--text_red: var(--theme_dark--text_red);
--theme--select-text: var(--theme_dark--select-text);
--theme--bg-text: var(--theme_dark--bg-text);
--theme--bg_gray: var(--theme_dark--bg_gray);
--theme--bg_gray-text: var(--theme_dark--bg_gray-text);
--theme--bg_brown: var(--theme_dark--bg_brown);
--theme--bg_brown-text: var(--theme_dark--bg_brown-text);
--theme--bg_orange: var(--theme_dark--bg_orange);
--theme--bg_orange-text: var(--theme_dark--bg_orange-text);
--theme--bg_yellow: var(--theme_dark--bg_yellow);
--theme--bg_yellow-text: var(--theme_dark--bg_yellow-text);
--theme--bg_green: var(--theme_dark--bg_green);
--theme--bg_green-text: var(--theme_dark--bg_green-text);
--theme--bg_blue: var(--theme_dark--bg_blue);
--theme--bg_blue-text: var(--theme_dark--bg_blue-text);
--theme--bg_purple: var(--theme_dark--bg_purple);
--theme--bg_purple-text: var(--theme_dark--bg_purple-text);
--theme--bg_pink: var(--theme_dark--bg_pink);
--theme--bg_pink-text: var(--theme_dark--bg_pink-text);
--theme--bg_red: var(--theme_dark--bg_red);
--theme--bg_red-text: var(--theme_dark--bg_red-text);
--theme--line-text: var(--theme_dark--line-text);
--theme--line_gray: var(--theme_dark--line_gray);
--theme--line_gray-text: var(--theme_dark--line_gray-text);
--theme--line_brown: var(--theme_dark--line_brown);
--theme--line_brown-text: var(--theme_dark--line_brown-text);
--theme--line_orange: var(--theme_dark--line_orange);
--theme--line_orange-text: var(--theme_dark--line_orange-text);
--theme--line_yellow: var(--theme_dark--line_yellow);
--theme--line_yellow-text: var(--theme_dark--line_yellow-text);
--theme--line_green: var(--theme_dark--line_green);
--theme--line_green-text: var(--theme_dark--line_green-text);
--theme--line_blue: var(--theme_dark--line_blue);
--theme--line_blue-text: var(--theme_dark--line_blue-text);
--theme--line_purple: var(--theme_dark--line_purple);
--theme--line_purple-text: var(--theme_dark--line_purple-text);
--theme--line_pink: var(--theme_dark--line_pink);
--theme--line_pink-text: var(--theme_dark--line_pink-text);
--theme--line_red: var(--theme_dark--line_red);
--theme--line_red-text: var(--theme_dark--line_red-text);
--theme--select_gray: var(--theme_dark--select_gray);
--theme--select_gray-text: var(--theme_dark--select_gray-text);
--theme--select_brown: var(--theme_dark--select_brown);
--theme--select_brown-text: var(--theme_dark--select_brown-text);
--theme--select_orange: var(--theme_dark--select_orange);
--theme--select_orange-text: var(--theme_dark--select_orange-text);
--theme--select_yellow: var(--theme_dark--select_yellow);
--theme--select_yellow-text: var(--theme_dark--select_yellow-text);
--theme--select_green: var(--theme_dark--select_green);
--theme--select_green-text: var(--theme_dark--select_green-text);
--theme--select_blue: var(--theme_dark--select_blue);
--theme--select_blue-text: var(--theme_dark--select_blue-text);
--theme--select_purple: var(--theme_dark--select_purple);
--theme--select_purple-text: var(--theme_dark--select_purple-text);
--theme--select_pink: var(--theme_dark--select_pink);
--theme--select_pink-text: var(--theme_dark--select_pink-text);
--theme--select_red: var(--theme_dark--select_red);
--theme--select_red-text: var(--theme_dark--select_red-text);
--theme--callout-text: var(--theme_dark--callout-text);
--theme--callout_gray: var(--theme_dark--callout_gray);
--theme--callout_gray-text: var(--theme_dark--callout_gray-text);
--theme--callout_brown: var(--theme_dark--callout_brown);
--theme--callout_brown-text: var(--theme_dark--callout_brown-text);
--theme--callout_orange: var(--theme_dark--callout_orange);
--theme--callout_orange-text: var(--theme_dark--callout_orange-text);
--theme--callout_yellow: var(--theme_dark--callout_yellow);
--theme--callout_yellow-text: var(--theme_dark--callout_yellow-text);
--theme--callout_green: var(--theme_dark--callout_green);
--theme--callout_green-text: var(--theme_dark--callout_green-text);
--theme--callout_blue: var(--theme_dark--callout_blue);
--theme--callout_blue-text: var(--theme_dark--callout_blue-text);
--theme--callout_purple: var(--theme_dark--callout_purple);
--theme--callout_purple-text: var(--theme_dark--callout_purple-text);
--theme--callout_pink: var(--theme_dark--callout_pink);
--theme--callout_pink-text: var(--theme_dark--callout_pink-text);
--theme--callout_red: var(--theme_dark--callout_red);
--theme--callout_red-text: var(--theme_dark--callout_red-text);
--theme--code_inline-text: var(--theme_dark--code_inline-text);
--theme--code_inline-background: var(--theme_dark--code_inline-background);
--theme--code-text: var(--theme_dark--code-text);
--theme--code-background: var(--theme_dark--code-background);
--theme--code_function: var(--theme_dark--code_function);
--theme--code_keyword: var(--theme_dark--code_keyword);
--theme--code_tag: var(--theme_dark--code_tag);
--theme--code_operator: var(--theme_dark--code_operator);
--theme--code_important: var(--theme_dark--code_important);
--theme--code_property: var(--theme_dark--code_property);
--theme--code_builtin: var(--theme_dark--code_builtin);
--theme--code_attr-name: var(--theme_dark--code_attr-name);
--theme--code_comment: var(--theme_dark--code_comment);
--theme--code_punctuation: var(--theme_dark--code_punctuation);
--theme--code_doctype: var(--theme_dark--code_doctype);
--theme--code_number: var(--theme_dark--code_number);
--theme--code_string: var(--theme_dark--code_string);
--theme--code_attr-value: var(--theme_dark--code_attr-value);
}
.notion-light-theme {
--theme--main: var(--theme_light--main);
--theme--sidebar: var(--theme_light--sidebar);
--theme--overlay: var(--theme_light--overlay);
--theme--dragarea: var(--theme_light--dragarea);
--theme--box-shadow: var(--theme_light--box-shadow);
--theme--box-shadow_strong: var(--theme_light--box-shadow_strong);
--theme--page_normal-width: var(--theme_light--page_normal-width);
--theme--page_full-width: var(--theme_light--page_full-width);
--theme--page-padding: var(--theme_light--page-padding);
--theme--page_banner-height: var(--theme_light--page_banner-height);
--theme--preview-width: var(--theme_light--preview-width);
--theme--preview-padding: var(--theme_light--preview-padding);
--theme--preview_banner-height: var(--theme_light--preview_banner-height);
--theme--font_sans: var(--theme_light--font_sans);
--theme--font_serif: var(--theme_light--font_serif);
--theme--font_mono: var(--theme_light--font_mono);
--theme--font_code: var(--theme_light--font_code);
--theme--font_quote: var(--theme_light--font_sans);
--theme--font_title-size: var(--theme_light--font_title-size);
--theme--font_heading1-size: var(--theme_light--font_heading1-size);
--theme--font_heading2-size: var(--theme_light--font_heading2-size);
--theme--font_heading3-size: var(--theme_light--font_heading3-size);
--theme--font_label-size: var(--theme_light--font_label-size);
--theme--font_body-size: var(--theme_light--font_body-size);
--theme--font_body-size_small: var(--theme_light--font_body-size_small);
--theme--font_code-size: var(--theme_light--font_code-size);
--theme--font_sidebar-size: var(--theme_light--font_sidebar-size);
--theme--text-block_line-height: var(--theme_light--text-block_line-height);
--theme--text-block_margin-top: var(--theme_light--text-block_margin-top);
--theme--scrollbar: var(--theme_light--scrollbar);
--theme--scrollbar-border: var(--theme_light--scrollbar-border);
--theme--scrollbar_hover: var(--theme_light--scrollbar_hover);
--theme--card: var(--theme_light--card);
--theme--gallery: var(--theme_light--gallery);
--theme--select_input: var(--theme_light--select_input);
--theme--table-border: var(--theme_light--table-border);
--theme--ui-border: var(--theme_light--ui-border);
--theme--interactive_hover: var(--theme_light--interactive_hover);
--theme--interactive_hover-border: var(
--theme_light--interactive_hover-border
);
--theme--button_close: var(--theme_light--button_close);
--theme--button_close-fill: var(--theme_light--button_close-fill);
--theme--selected: var(--theme_light--selected);
--theme--primary: var(--theme_light--primary);
--theme--primary_hover: var(--theme_light--primary_hover);
--theme--primary_click: var(--theme_light--primary_click);
--theme--primary_indicator: var(--theme_light--primary_indicator);
--theme--option-color: var(--theme_light--option-color);
--theme--option-background: var(--theme_light--option-background);
--theme--option_hover-color: var(--theme_light--option_hover-color);
--theme--option_hover-background: var(--theme_light--option_hover-background);
--theme--option_active-color: var(--theme_light--option_active-color);
--theme--option_active-background: var(
--theme_light--option_active-background
);
--theme--danger_text: var(--theme_light--danger_text);
--theme--danger_border: var(--theme_light--danger_border);
--theme--text: var(--theme_light--text);
--theme--text_ui: var(--theme_light--text_ui);
--theme--text_ui_info: var(--theme_light--text_ui_info);
--theme--text_gray: var(--theme_light--text_gray);
--theme--text_brown: var(--theme_light--text_brown);
--theme--text_orange: var(--theme_light--text_orange);
--theme--text_yellow: var(--theme_light--text_yellow);
--theme--text_green: var(--theme_light--text_green);
--theme--text_blue: var(--theme_light--text_blue);
--theme--text_purple: var(--theme_light--text_purple);
--theme--text_pink: var(--theme_light--text_pink);
--theme--text_red: var(--theme_light--text_red);
--theme--select-text: var(--theme_light--select-text);
--theme--bg-text: var(--theme_light--bg-text);
--theme--bg_gray: var(--theme_light--bg_gray);
--theme--bg_gray-text: var(--theme_light--bg_gray-text);
--theme--bg_brown: var(--theme_light--bg_brown);
--theme--bg_brown-text: var(--theme_light--bg_brown-text);
--theme--bg_orange: var(--theme_light--bg_orange);
--theme--bg_orange-text: var(--theme_light--bg_orange-text);
--theme--bg_yellow: var(--theme_light--bg_yellow);
--theme--bg_yellow-text: var(--theme_light--bg_yellow-text);
--theme--bg_green: var(--theme_light--bg_green);
--theme--bg_green-text: var(--theme_light--bg_green-text);
--theme--bg_blue: var(--theme_light--bg_blue);
--theme--bg_blue-text: var(--theme_light--bg_blue-text);
--theme--bg_purple: var(--theme_light--bg_purple);
--theme--bg_purple-text: var(--theme_light--bg_purple-text);
--theme--bg_pink: var(--theme_light--bg_pink);
--theme--bg_pink-text: var(--theme_light--bg_pink-text);
--theme--bg_red: var(--theme_light--bg_red);
--theme--bg_red-text: var(--theme_light--bg_red-text);
--theme--line-text: var(--theme_light--line-text);
--theme--line_gray: var(--theme_light--line_gray);
--theme--line_gray-text: var(--theme_light--line_gray-text);
--theme--line_brown: var(--theme_light--line_brown);
--theme--line_brown-text: var(--theme_light--line_brown-text);
--theme--line_orange: var(--theme_light--line_orange);
--theme--line_orange-text: var(--theme_light--line_orange-text);
--theme--line_yellow: var(--theme_light--line_yellow);
--theme--line_yellow-text: var(--theme_light--line_yellow-text);
--theme--line_green: var(--theme_light--line_green);
--theme--line_green-text: var(--theme_light--line_green-text);
--theme--line_blue: var(--theme_light--line_blue);
--theme--line_blue-text: var(--theme_light--line_blue-text);
--theme--line_purple: var(--theme_light--line_purple);
--theme--line_purple-text: var(--theme_light--line_purple-text);
--theme--line_pink: var(--theme_light--line_pink);
--theme--line_pink-text: var(--theme_light--line_pink-text);
--theme--line_red: var(--theme_light--line_red);
--theme--line_red-text: var(--theme_light--line_red-text);
--theme--select_gray: var(--theme_light--select_gray);
--theme--select_gray-text: var(--theme_light--select_gray-text);
--theme--select_brown: var(--theme_light--select_brown);
--theme--select_brown-text: var(--theme_light--select_brown-text);
--theme--select_orange: var(--theme_light--select_orange);
--theme--select_orange-text: var(--theme_light--select_orange-text);
--theme--select_yellow: var(--theme_light--select_yellow);
--theme--select_yellow-text: var(--theme_light--select_yellow-text);
--theme--select_green: var(--theme_light--select_green);
--theme--select_green-text: var(--theme_light--select_green-text);
--theme--select_blue: var(--theme_light--select_blue);
--theme--select_blue-text: var(--theme_light--select_blue-text);
--theme--select_purple: var(--theme_light--select_purple);
--theme--select_purple-text: var(--theme_light--select_purple-text);
--theme--select_pink: var(--theme_light--select_pink);
--theme--select_pink-text: var(--theme_light--select_pink-text);
--theme--select_red: var(--theme_light--select_red);
--theme--select_red-text: var(--theme_light--select_red-text);
--theme--callout-text: var(--theme_light--callout-text);
--theme--callout_gray: var(--theme_light--callout_gray);
--theme--callout_gray-text: var(--theme_light--callout_gray-text);
--theme--callout_brown: var(--theme_light--callout_brown);
--theme--callout_brown-text: var(--theme_light--callout_brown-text);
--theme--callout_orange: var(--theme_light--callout_orange);
--theme--callout_orange-text: var(--theme_light--callout_orange-text);
--theme--callout_yellow: var(--theme_light--callout_yellow);
--theme--callout_yellow-text: var(--theme_light--callout_yellow-text);
--theme--callout_green: var(--theme_light--callout_green);
--theme--callout_green-text: var(--theme_light--callout_green-text);
--theme--callout_blue: var(--theme_light--callout_blue);
--theme--callout_blue-text: var(--theme_light--callout_blue-text);
--theme--callout_purple: var(--theme_light--callout_purple);
--theme--callout_purple-text: var(--theme_light--callout_purple-text);
--theme--callout_pink: var(--theme_light--callout_pink);
--theme--callout_pink-text: var(--theme_light--callout_pink-text);
--theme--callout_red: var(--theme_light--callout_red);
--theme--callout_red-text: var(--theme_light--callout_red-text);
--theme--code_inline-text: var(--theme_light--code_inline-text);
--theme--code_inline-background: var(--theme_light--code_inline-background);
--theme--code-text: var(--theme_light--code-text);
--theme--code-background: var(--theme_light--code-background);
--theme--code_function: var(--theme_light--code_function);
--theme--code_keyword: var(--theme_light--code_keyword);
--theme--code_tag: var(--theme_light--code_tag);
--theme--code_operator: var(--theme_light--code_operator);
--theme--code_important: var(--theme_light--code_important);
--theme--code_property: var(--theme_light--code_property);
--theme--code_builtin: var(--theme_light--code_builtin);
--theme--code_attr-name: var(--theme_light--code_attr-name);
--theme--code_comment: var(--theme_light--code_comment);
--theme--code_punctuation: var(--theme_light--code_punctuation);
--theme--code_doctype: var(--theme_light--code_doctype);
--theme--code_number: var(--theme_light--code_number);
--theme--code_string: var(--theme_light--code_string);
--theme--code_attr-value: var(--theme_light--code_attr-value);
}

View File

@ -1,65 +0,0 @@
/*
* custom inserts
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* under the MIT license
*/
'use strict';
const { createElement } = require('../../pkg/helpers.js');
module.exports = {
id: 'b4b0aced-2059-43bf-8d1d-ccd757ee5ebb',
tags: ['extension'],
name: 'custom inserts',
desc: `link files for small client-side tweaks. (not sure how to do something? check out the
[tweaks](https://github.com/notion-enhancer/notion-enhancer/blob/master/TWEAKS.md) collection.)`,
version: '0.1.3',
author: 'dragonwocky',
options: [
{
key: 'css',
label: 'css insert',
type: 'file',
extensions: ['css'],
},
{
key: 'js',
label: 'client-side js insert',
type: 'file',
extensions: ['js'],
},
],
hacks: {
'renderer/preload.js'(store, __exports) {
const fs = require('fs-extra');
document.addEventListener('readystatechange', (event) => {
if (document.readyState !== 'complete') return false;
if (store().css) {
try {
document
.querySelector('head')
.appendChild(
createElement(
`<style type="text/css">${fs.readFileSync(
store().css
)}</style>`
)
);
} catch (err) {
console.warn('<custom-inserts> invalid css file... unsetting.');
store().css = '';
}
}
if (store().js) {
try {
require(store().js);
} catch (err) {
console.warn('<custom-inserts> invalid js file... unsetting.');
store().js = '';
}
}
});
},
},
};

View File

@ -1,52 +0,0 @@
/*
* dark+
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* under the MIT license
*/
'use strict';
module.exports = {
id: 'c86cfe98-e645-4822-aa6b-e2de1e08bafa',
tags: ['theme', 'dark'],
name: 'dark+',
desc: 'a vivid-colour near-black theme.',
version: '0.1.6',
author: 'dragonwocky',
options: [
{
key: 'primary',
label: 'primary colour',
type: 'color',
value: 'rgb(177, 24, 24)',
},
],
hacks: {
'renderer/preload.js'(store, __exports) {
const color = require('./one-color.js')(store().primary);
document.addEventListener('readystatechange', (event) => {
if (document.readyState !== 'complete') return false;
document.documentElement.style.setProperty(
'--theme_dark--selected',
color.lightness(0.35).alpha(0.2).cssa()
);
document.documentElement.style.setProperty(
'--theme_dark--primary',
color.hex()
);
document.documentElement.style.setProperty(
'--theme_dark--primary_hover',
color.lightness(0.5).hex()
);
document.documentElement.style.setProperty(
'--theme_dark--primary_click',
color.lightness(0.6).hex()
);
document.documentElement.style.setProperty(
'--theme_dark--primary_indicator',
color.lightness(0.4).hex()
);
});
},
},
};

File diff suppressed because one or more lines are too long

View File

@ -1,98 +0,0 @@
/*
* dark+
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 Alexa Baldon (https://github.com/runargs)
* under the MIT license
*/
:root {
--theme_dark--main: rgb(5, 5, 5);
--theme_dark--sidebar: rgb(1, 1, 1);
--theme_dark--dragarea: #000;
--theme_dark--box-shadow_strong: none;
--theme_dark--scrollbar: #23242599;
--theme_dark--scrollbar-border: transparent;
--theme_dark--scrollbar_hover: #37383899;
--theme_dark--card: rgb(8, 8, 8);
--theme_dark--gallery: rgba(26, 26, 26, 0.3);
--theme_dark--select_input: rgb(12, 12, 12);
--theme_dark--table-border: rgba(46, 46, 46, 0.7);
--theme_dark--ui-border: var(--theme_dark--table-border);
--theme_dark--interactive_hover:rgba(55, 56, 56, 0.3);
--theme_dark--option_hover-background: rgb(32, 32, 32);
--theme_dark--text: rgb(228, 228, 228);
--theme_dark--text_ui: rgba(211, 211, 211, 0.637);
--theme_dark--text_ui_info: rgba(211, 211, 211, 0.466);
--theme_dark--text_gray: rgba(151, 154, 155, 0.95);
--theme_dark--text_brown: rgb(147, 114, 100);
--theme_dark--text_orange: rgb(255, 163, 68);
--theme_dark--text_yellow: rgb(255, 220, 73);
--theme_dark--text_green: rgb(50, 169, 104);
--theme_dark--text_blue: rgb(82, 156, 202);
--theme_dark--text_purple: rgb(154, 109, 215);
--theme_dark--text_pink: rgb(226, 85, 161);
--theme_dark--text_red: rgb(218, 47, 35);
--theme_dark--select_gray: rgba(126, 128, 129, 0.5);
--theme_dark--select_brown: #50331f;
--theme_dark--select_orange: rgba(255, 155, 0, 0.58);
--theme_dark--select_yellow: rgba(183, 155, 0, 1);
--theme_dark--select_green: rgb(50, 129, 47);
--theme_dark--select_blue: rgba(0, 90, 146, 0.71);
--theme_dark--select_purple: rgba(91, 49, 148, 0.74);
--theme_dark--select_pink: rgba(243, 61, 159, 0.5);
--theme_dark--select_red: rgb(122, 20, 20);
--theme_dark--bg_gray: var(--theme_dark--select_gray);
--theme_dark--bg_brown: var(--theme_dark--select_brown);
--theme_dark--bg_orange: var(--theme_dark--select_orange);
--theme_dark--bg_yellow: var(--theme_dark--select_yellow);
--theme_dark--bg_green: var(--theme_dark--select_green);
--theme_dark--bg_blue: var(--theme_dark--select_blue);
--theme_dark--bg_purple: var(--theme_dark--select_purple);
--theme_dark--bg_pink: var(--theme_dark--select_pink);
--theme_dark--bg_red: var(--theme_dark--select_red);
--theme_dark--line_gray: rgba(126, 128, 129, 0.301);
--theme_dark--line_brown: #50331fad;
--theme_dark--line_orange: rgba(255, 153, 0, 0.315);
--theme_dark--line_yellow: rgba(183, 156, 0, 0.445);
--theme_dark--line_green: rgba(50, 129, 47, 0.39);
--theme_dark--line_blue: rgba(0, 90, 146, 0.521);
--theme_dark--line_purple: rgba(90, 49, 148, 0.349);
--theme_dark--line_pink: rgba(243, 61, 158, 0.301);
--theme_dark--line_red: rgba(122, 20, 20, 0.623);
--theme_dark--callout_gray: rgba(126, 128, 129, 0.089);
--theme_dark--callout_brown: #50331f59;
--theme_dark--callout_orange: rgba(255, 153, 0, 0.164);
--theme_dark--callout_yellow: rgba(183, 156, 0, 0.274);
--theme_dark--callout_green: rgba(50, 129, 47, 0.191);
--theme_dark--callout_blue: rgba(0, 90, 146, 0.294);
--theme_dark--callout_purple: rgba(90, 49, 148, 0.219);
--theme_dark--callout_pink: rgba(243, 61, 158, 0.191);
--theme_dark--callout_red: rgba(122, 20, 20, 0.376);
--theme_dark--code_inline-text: #7dc582;
--theme_dark--code_inline-background: rgb(8, 8, 8);
--theme_dark--code-background: rgb(8, 8, 8);
--theme_dark--code_function: #c7e1ff;
--theme_dark--code_keyword: #c397d8;
--theme_dark--code_tag: #82aed8;
--theme_dark--code_operator: rgb(166, 175, 201);
--theme_dark--code_important: #da265f;
--theme_dark--code_property: #82aed8;
--theme_dark--code_builtin: #ff6294;
--theme_dark--code_attr-name: #ff6294;
--theme_dark--code_comment: rgb(166, 175, 201);
--theme_dark--code_punctuation: rgb(166, 175, 201);
--theme_dark--code_doctype: rgb(166, 175, 201);
--theme_dark--code_number: #c397d8;
--theme_dark--code_string: #7dc582;
--theme_dark--code_attr-value: #7dc582;
}

View File

@ -1,18 +0,0 @@
/*
* dracula
* (c) 2020 @mimishahzad386#5651
* (c) 2020 dracula
* under the MIT license
*/
'use strict';
module.exports = {
id: '033bff54-50ba-4cec-bdc0-b2ca7e307086',
tags: ['theme', 'dark'],
name: 'dracula',
desc:
'a theme based on the popular dracula color palette originally by zeno rocha and friends. ',
version: '0.1.0',
author: 'dracula',
};

View File

@ -1,131 +0,0 @@
/*
* dracula
* (c) 2020 @mimishahzad386#5651
* (c) 2020 dracula
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 Alexa Baldon (https://github.com/runargs)
* under the MIT license
*/
:root {
--theme_dark--main: #282a36;
--theme_dark--sidebar: #21232c;
--theme_dark--overlay: rgba(13, 13, 14, 0.5);
--theme_dark--dragarea: #20222b;
--theme_dark--font_sans: -apple-system, BlinkMacSystemFont, 'Segoe UI',
Helvetica, 'Apple Color Emoji', Arial, sans-serif, 'Segoe UI Emoji',
'Segoe UI Symbol';
--theme_dark--scrollbar: #393c4d;
--theme_dark--scrollbar_hover: #576591;
--theme_dark--card: #3c3f50;
--theme_dark--gallery: #323546;
--theme_dark--select_input: #474a5c;
--theme_dark--table-border: #484b59;
--theme_dark--ui-border: var(--theme_dark--table-border);
--theme_dark--interactive_hover: rgba(64, 73, 105, 0.7);
--theme_dark--button_close: #ff5555;
--theme_dark--selected: rgba(189, 147, 249, 0.3);
--theme_dark--primary: #bd93f9;
--theme_dark--primary_hover: #8be9fd;
--theme_dark--primary_click: #bd93f9;
--theme_dark--primary_indicator: #8be9fd;
--theme_dark--option_active-background: var(--theme_dark--primary);
--theme_dark--option_hover-background: var(--theme_dark--primary_hover);
--theme_dark--danger_text: #ff5555;
--theme_dark--danger_border: #ffb86c;
--theme_dark--text: #f8f8f2;
--theme_dark--text_ui: #f8f8f2;
--theme_dark--text_ui_info: #f8f8f2;
--theme_dark--text_gray: #807e8d;
--theme_dark--text_brown: #6272a4;
--theme_dark--text_orange: #ffb86c;
--theme_dark--text_yellow: #f1fa8c;
--theme_dark--text_green: #50fa7b;
--theme_dark--text_blue: #8be9fd;
--theme_dark--text_purple: #bd93f9;
--theme_dark--text_pink: #ff79c6;
--theme_dark--text_red: #ff5555;
--theme_dark--select-text: #000000;
--theme_dark--select_gray: #454158;
--theme_dark--select_gray-text: #f5f5f5;
--theme_dark--select_brown: #6272a4;
--theme_dark--select_brown-text: #f5f5f5;
--theme_dark--select_orange: #ffb86c;
--theme_dark--select_yellow: #f1fa8c;
--theme_dark--select_green: #50fa7b;
--theme_dark--select_blue: #8be9fd;
--theme_dark--select_purple: #bd93f9;
--theme_dark--select_pink: #ff79c6;
--theme_dark--select_red: #ff5555;
--theme_dark--select_red-text: #f5f5f5;
--theme_dark--bg-text: var(--theme_dark--select-text);
--theme_dark--bg_gray: var(--theme_dark--select_gray);
--theme_dark--bg_gray-text: #f5f5f5;
--theme_dark--bg_brown: var(--theme_dark--select_brown);
--theme_dark--bg_brown-text: #f5f5f5;
--theme_dark--bg_orange: var(--theme_dark--select_orange);
--theme_dark--bg_yellow: var(--theme_dark--select_yellow);
--theme_dark--bg_green: var(--theme_dark--select_green);
--theme_dark--bg_blue: var(--theme_dark--select_blue);
--theme_dark--bg_purple: var(--theme_dark--select_purple);
--theme_dark--bg_pink: var(--theme_dark--select_pink);
--theme_dark--bg_red: var(--theme_dark--select_red);
--theme_dark--bg_red-text: #f5f5f5;
--theme_dark--line-text: #000000;
--theme_dark--line_gray: #3c3f50;
--theme_dark--line_gray-text: #f5f5f5;
--theme_dark--line_brown: #6272a4;
--theme_dark--line_brown-text: #f5f5f5;
--theme_dark--line_orange: #ffb86c;
--theme_dark--line_yellow: #f1fa8c;
--theme_dark--line_green: #50fa7b;
--theme_dark--line_blue: #8be9fd;
--theme_dark--line_purple: #bd93f9;
--theme_dark--line_pink: #ff79c6;
--theme_dark--line_red: #ff5555;
--theme_dark--line_red-text: #f5f5f5;
--theme_dark--callout-text: var(--theme_dark--line-text);
--theme_dark--callout_gray: var(--theme_dark--line_gray);
--theme_dark--callout_gray-text: #f5f5f5;
--theme_dark--callout_brown: var(--theme_dark--line_brown);
--theme_dark--callout_brown-text: #f5f5f5;
--theme_dark--callout_orange: var(--theme_dark--line_orange);
--theme_dark--callout_yellow: var(--theme_dark--line_yellow);
--theme_dark--callout_green: var(--theme_dark--line_green);
--theme_dark--callout_blue: var(--theme_dark--line_blue);
--theme_dark--callout_purple: var(--theme_dark--line_purple);
--theme_dark--callout_pink: var(--theme_dark--line_pink);
--theme_dark--callout_red: var(--theme_dark--line_red);
--theme_dark--callout_red-text: #f5f5f5;
--theme_dark--code_inline-text: #50fa7b;
--theme_dark--code_inline-background: #3c3f50;
--theme_dark--code-text: var(--theme_dark--text);
--theme_dark--code-background: #3c3f50;
--theme_dark--code_function: var(--theme_dark--text_blue);
--theme_dark--code_keyword: var(--theme_dark--text_pink);
--theme_dark--code_tag: var(--theme_dark--text_pink);
--theme_dark--code_operator: var(--theme_dark--text_yellow);
--theme_dark--code_important: var(--theme_dark--text_yellow);
--theme_dark--code_property: var(--theme_dark--text_pink);
--theme_dark--code_builtin: var(--theme_dark--text_yellow);
--theme_dark--code_attr-name: var(--theme_dark--text_yellow);
--theme_dark--code_comment: var(--theme_dark--text_ui);
--theme_dark--code_punctuation: #d2d0dc;
--theme_dark--code_doctype: #d2d0dc;
--theme_dark--code_number: var(--theme_dark--text_purple);
--theme_dark--code_string: var(--theme_dark--text_orange);
--theme_dark--code_attr-value: var(--theme_dark--text_orange);
}

View File

@ -1,145 +0,0 @@
/*
* emoji sets
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* under the MIT license
*/
'use strict';
module.exports = {
id: 'a2401ee1-93ba-4b8c-9781-7f570bf5d71e',
tags: ['extension'],
name: 'emoji sets',
desc: 'pick from a variety of emoji styles to use.',
version: '0.3.0',
author: 'dragonwocky',
options: [
{
key: 'style',
label: '',
type: 'select',
value: [
'twitter',
'apple',
'google',
'microsoft',
'samsung',
'whatsapp',
'facebook',
'joypixels',
'openmoji',
'emojidex',
'lg',
'htc',
'mozilla',
],
},
],
hacks: {
'renderer/preload.js'(store, __exports) {
let tweaked = false;
document.addEventListener('readystatechange', (event) => {
if (document.readyState !== 'complete') return false;
let queue = [];
const observer = new MutationObserver((list, observer) => {
if (!queue.length) requestAnimationFrame(handle);
queue.push(...list);
});
observer.observe(document.body, {
childList: true,
subtree: true,
characterData: true,
});
function handle() {
queue = [];
const isMac = process.platform === 'darwin',
native =
(store().style === 'microsoft' && process.platform === 'win32') ||
(store().style === 'apple' && isMac);
if (store().style !== (isMac ? 'apple' : 'twitter') || tweaked) {
if (isMac) {
if (native) {
document
.querySelectorAll('span[role="image"][aria-label]')
.forEach((el) => {
el.style.background = '';
el.style.color = 'currentColor';
});
} else {
document
.querySelectorAll('span[role="image"][aria-label]')
.forEach((el) => {
if (!el.style.background.includes(store().style)) {
el.style.background = `url(https://emojicdn.elk.sh/${el.getAttribute(
'aria-label'
)}?style=${store().style})`;
el.style.width = el.parentElement.style.fontSize;
el.style.backgroundSize = 'contain';
el.style.backgroundRepeat = 'no-repeat';
el.style.color = 'transparent';
}
});
}
} else {
document
.querySelectorAll(
'[src*="notion-emojis.s3"]:not(.notion-emoji)'
)
.forEach((el) => el.remove());
if (native) {
document.querySelectorAll('.notion-emoji').forEach((el) => {
if (
el.parentElement.querySelectorAll(
'span[role="image"][aria-label]'
).length !==
el.parentElement.querySelectorAll('.notion-emoji').length
) {
el.insertAdjacentHTML(
'beforebegin',
`<span
role="image"
aria-label="${el.getAttribute('alt')}"
style='font-family: "Apple Color Emoji", "Segoe UI Emoji",
NotoColorEmoji, "Noto Color Emoji", "Segoe UI Symbol",
"Android Emoji", EmojiSymbols; line-height: 1em;'
>${el.getAttribute('alt')}</span>`
);
el.style.display = 'none';
if (el.parentElement.getAttribute('contenteditable'))
el.remove();
} else if (
el.previousElementSibling.matches(
'span[role="image"][aria-label]'
)
) {
el.previousElementSibling.innerText = el.getAttribute(
'alt'
);
el.setAttribute('aria-label', el.getAttribute('alt'));
}
});
} else {
document.querySelectorAll('.notion-emoji').forEach((el) => {
el.parentElement
.querySelectorAll('span[role="image"][aria-label]')
.forEach((text) => text.remove());
el.style.display = 'inline-block';
if (!el.style.background.includes(store().style)) {
el.style.background = `url(https://emojicdn.elk.sh/${el.getAttribute(
'aria-label'
)}?style=${store().style})`;
el.style.backgroundSize = 'contain';
el.style.backgroundRepeat = 'no-repeat';
el.style.opacity = 1;
}
});
}
}
tweaked = true;
}
}
});
},
},
};

View File

@ -1,28 +0,0 @@
/*
* focus mode
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 Arecsu
* under the MIT license
*/
.notion-sidebar-container[style*='width: 0px;'] + .notion-frame .notion-topbar {
opacity: 0 !important;
transition: opacity 200ms ease-in-out !important;
}
.notion-sidebar-container[style*='width: 0px;']
+ .notion-frame
.notion-topbar:hover {
opacity: 1 !important;
}
/* add space at the bottom of the main frame when sidebar is hidden
* -- matches space at top for titlebar */
[data-focusmode='padded'] .notion-dark-theme .notion-frame {
transition: height 100ms ease 0s;
}
[data-focusmode='padded']
.notion-sidebar-container[style*='width: 0px;']
+ .notion-frame {
height: calc(
100% - (var(--configured--dragarea_height, 10px) + 45px)
) !important;
}

View File

@ -1,36 +0,0 @@
/*
* focus mode
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 Arecsu
* under the MIT license
*/
'use strict';
module.exports = {
id: '5a08598d-bfac-4167-9ae8-2bd0e2ef141e',
tags: ['extension'],
name: 'focus mode',
desc:
'hide the titlebar/menubar if the sidebar is closed (will be shown on hover).',
version: '0.2.0',
author: 'arecsu',
options: [
{
key: 'padded',
label: 'add padding to bottom of the page',
desc: `will only take effect when the sidebar is hidden. aims to make the canvas\
as symmetrical/consistent as possible: if there is empty space on 3 sides, the 4th should follow.`,
type: 'toggle',
value: true,
},
],
hacks: {
'renderer/preload.js': (store, __exports) => {
document.addEventListener('readystatechange', (event) => {
if (document.readyState !== 'complete') return false;
if (store().padded) document.body.dataset.focusmode = 'padded';
});
},
},
};

View File

@ -1,66 +0,0 @@
/*
* font chooser
* (c) 2020 torchatlas (https://bit.ly/torchatlas)
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 admiraldus (https://github.com/admiraldus)
* under the MIT license
*/
'use strict';
module.exports = {
id: 'e0d8d148-45e7-4d79-8313-e7b2ad8abe16',
tags: ['extension'],
name: 'font chooser',
desc:
'customize fonts. for each option, type in the name of the font you would like to use, or leave it blank to not change anything.<br/><br/>make sure the fonts you type are installed on your device.',
version: '0.2.1',
author: 'torchatlas',
options: [
{
key: 'sans',
label: 'sans-serif (inc. ui):',
type: 'input',
value: '',
},
{
key: 'serif',
label: 'serif:',
type: 'input',
value: '',
},
{
key: 'mono',
label: 'monospace:',
type: 'input',
value: '',
},
{
key: 'code',
label: 'code:',
type: 'input',
value: '',
},
{
key: 'quote',
label: 'quote:',
type: 'input',
value: '',
},
],
hacks: {
'renderer/preload.js'(store, __exports) {
const attempt_interval = setInterval(enhance, 500);
async function enhance() {
if (!document.querySelector('.notion-app-inner')) return;
clearInterval(attempt_interval);
for (let style of ['sans', 'serif', 'mono', 'code', 'quote']) {
if (!store()[style]) continue;
document
.querySelector('.notion-app-inner')
.style.setProperty(`--theme--font_${style}`, store()[style]);
}
}
},
},
};

View File

@ -1,14 +0,0 @@
/*
* gameish
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 u/LVL100ShrekCultist
* under the MIT license
*/
.notion-dark-theme
.notion-scroller.vertical.horizontal
.notion-table-view
.notion-selectable.notion-collection_view-block
> :first-child {
background: var(--theme--card) !important;
}

View File

@ -1,22 +0,0 @@
/*
* gameish
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 u/LVL100ShrekCultist
* under the MIT license
*/
'use strict';
module.exports = {
id: 'ad923617-e76e-408e-9f23-490738a3223f',
tags: ['theme', 'dark'],
name: 'gameish',
desc: 'a purple, "gamer-styled" theme with a blocky-font.',
version: '0.1.4',
author: {
name: 'LVL100ShrekCultist',
link: 'https://www.reddit.com/user/LVL100ShrekCultist/',
avatar:
'https://styles.redditmedia.com/t5_2js69j/styles/profileIcon_jvnzmo30fyq41.jpg',
},
};

View File

@ -1,71 +0,0 @@
/*
* gameish
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 u/LVL100ShrekCultist
* under the MIT license
*/
@import 'https://fonts.googleapis.com/css2?family=Baumans&family=Comfortaa&family=DM+Mono&family=Gruppo&family=Nova+Mono&family=Offside&family=Press+Start+2P&family=Righteous&display=swap';
:root {
--theme_dark--main: #1e1c26;
--theme_dark--sidebar: #24222c;
--theme_dark--dragarea: #19181f;
--theme_dark--font_sans: 'Offside', -apple-system, BlinkMacSystemFont,
'Segoe UI', Helvetica, 'Apple Color Emoji', Arial, sans-serif,
'Segoe UI Emoji', 'Segoe UI Symbol';
--theme_dark--font_mono: 'DM Mono', iawriter-mono, Nitti, Menlo, Courier,
monospace;
--theme_dark--font_code: 'DM Mono', SFMono-Regular, Consolas,
'Liberation Mono', Menlo, Courier, monospace;
--theme_dark--scrollbar: #221f29;
--theme_dark--scrollbar_hover: #312d3c;
--theme_dark--gallery: rgba(162, 162, 162, 0.01);
--theme_dark--table-border: rgba(148, 148, 184, 0.5);
--theme_dark--interactive_hover: #282632;
--theme_dark--selected: rgba(85, 68, 156, 0.3);
--theme_dark--primary: rgb(106, 47, 200);
--theme_dark--primary_hover: rgb(110, 48, 211);
--theme_dark--primary_click: rgb(117, 65, 200);
--theme_dark--primary_indicator: rgb(150, 84, 226);
--theme_dark--option_hover-background: rgb(20, 0, 51);
--theme_dark--danger_text: rgb(235, 87, 87);
--theme_dark--danger_border: rgba(235, 87, 87, 0.5);
--theme_dark--text: rgba(255, 255, 255, 0.9);
--theme_dark--text_ui: rgba(255, 255, 255, 0.6);
--theme_dark--text_ui_info: rgba(255, 255, 255, 0.4);
--theme_dark--text_gray: rgba(151, 154, 155, 0.95);
--theme_dark--text_brown: rgb(112, 87, 77);
--theme_dark--text_yellow: #ffe529;
--theme_dark--text_green: #64d97b;
--theme_dark--text_purple: #d43cc7;
--theme_dark--text_red: #d93939;
--theme_dark--select_red: rgba(216, 57, 46, 0.5);
--theme_dark--bg_brown: rgb(78, 57, 48);
--theme_dark--bg_orange: rgb(136, 80, 48);
--theme_dark--bg_yellow: #fbe2287c;
--theme_dark--bg_red: rgb(151, 62, 62);
--theme_dark--line_brown: var(--theme_dark--bg_brown);
--theme_dark--line_orange: var(--theme_dark--bg_orange);
--theme_dark--line_yellow: var(--theme_dark--bg_yellow);
--theme_dark--line_red: var(--theme_dark--bg_red);
--theme_dark--callout_brown: var(--theme_dark--bg_brown);
--theme_dark--callout_orange: var(--theme_dark--bg_orange);
--theme_dark--callout_yellow: var(--theme_dark--bg_yellow);
--theme_dark--callout_red: var(--theme_dark--bg_red);
--theme_dark--code_inline-text: #d9cbec;
--theme_dark--code_inline-background: #24222c;
}

View File

@ -1,105 +0,0 @@
/*
* indentation lines
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 Alexa Baldon (https://github.com/runargs)
* (c) 2020 CloudHill
* under the MIT license
*/
'use strict';
const { createElement } = require('../../pkg/helpers.js');
module.exports = {
id: '35815b3b-3916-4dc6-8769-c9c2448f8b57',
tags: ['extension'],
name: 'indentation lines',
desc: 'adds vertical relationship lines to make list trees easier to follow.',
version: '1.0.0',
author: 'runargs',
options: [
{
key: 'style',
label: 'style',
type: 'select',
value: ['solid', 'dashed', 'dotted', 'soft'],
},
{
key: 'bulleted_list',
label: 'bulleted list',
type: 'toggle',
value: true,
},
{
key: 'numbered_list',
label: 'numbered list',
type: 'toggle',
value: true,
},
{
key: 'to_do',
label: 'to-do list',
type: 'toggle',
value: true,
},
{
key: 'toggle',
label: 'toggle list',
type: 'toggle',
value: true,
},
],
hacks: {
'renderer/preload.js'(store, __exports) {
document.addEventListener('readystatechange', (event) => {
if (document.readyState !== 'complete') return false;
const selectors =
['bulleted_list', 'numbered_list', 'to_do', 'toggle']
.filter(l => store()[l])
.map(l => `.notion-page-content .notion-${l}-block > div > div:last-child`);
let style = 'solid';
let opacity = 1;
switch(store().style) {
case 'dashed':
style = 'dashed';
break;
case 'dotted':
style = 'dotted';
break;
case 'soft':
opacity = 0.25;
break;
}
if (selectors.length > 0) {
document
.querySelector('head')
.appendChild(
createElement(`
<style type="text/css">
.notion-app-inner {
--indentation-lines-style: ${style};
--indentation-lines-opacity: ${opacity};
}
${selectors.join(',\n')} {
position: relative;
}
${selectors.join('::before,\n')}::before {
content: "";
position: absolute;
height: calc(100% - 2em);
top: 2em;
left: -14.48px;
border-left: 1px var(--indentation-lines-style);
opacity: var(--indentation-lines-opacity);
}
</style>
`)
)
}
});
},
},
};

View File

@ -1,88 +0,0 @@
/*
* littlepig
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com>
* (c) 2020 Lizishan
* under the MIT license
*/
/* todo 颜色 */
.notion-body.dark .notion-dark-theme [style*='background: rgb(46, 170, 220)'],
.notion-body.dark
.notion-dark-theme
[style*='background-color: rgb(46, 170, 220)'] {
background: var(--theme_dark--option_active-background) !important;
}
/* ===================== header =========================== */
.notion-dark-theme [placeholder*='Heading 1'] {
color: var(--littlepig_dark--h1_text) !important;
}
.notion-dark-theme [placeholder*='Heading 2'] {
margin-bottom: 16px;
border-bottom: 4px solid var(--littlepig_dark--h2_text);
display: inline-block;
color: var(--littlepig_dark--h2_text) !important;
width: auto !important;
padding: 6px 12px 6px 0 !important;
position: relative;
}
.notion-dark-theme [placeholder*='Heading 2']::before {
content: '🔥 ';
}
.notion-dark-theme [placeholder*='Heading 3'] {
width: fit-content !important;
padding: 4px 10px !important;
border-radius: 10px;
border: 2px solid var(--littlepig_dark--h3_text);
color: var(--littlepig_dark--h3_text) !important;
background-color: #fbf8e7;
display: inline-block;
margin-bottom: 14px;
}
.notion-dark-theme [placeholder*='Heading 3']::before {
content: '📌 ';
}
/* list 样式 */
.notion-dark-theme
[style*='font-size: 1.5em; line-height: 1; margin-bottom: 0.1em;'] {
color: #a830fd !important;
}
/* quoteblock 样式 */
.notion-dark-theme
.notion-quote-block
[style*='caret-color: rgba(255, 255, 255, 0.9);'] {
font-size: 0.85em !important;
border-left: none !important;
padding: 0.5em 0.5em 0.5em 1.9em !important;
position: relative;
margin: 10px 0;
background: var(--theme_dark--card);
border-radius: 3px;
}
.notion-dark-theme
.notion-quote-block
[style*='caret-color: rgba(255, 255, 255, 0.9);']::before {
content: '\201C';
font-family: Georgia, serif;
font-size: 44px;
font-weight: bold;
color: #7b08fa;
position: absolute;
left: 0px;
top: -24px;
}
/* link style */
.notion-dark-theme .notion-link-token span {
border-bottom: 0.05em solid;
border-color: rgb(233, 51, 38) !important;
border-width: 3px !important;
opacity: 1 !important;
}
.notion-dark-theme .notion-link-token span:hover {
color: rgb(233, 51, 38) !important;
}

View File

@ -1,22 +0,0 @@
/*
* littlepig
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 Lizishan
* under the MIT license
*/
'use strict';
module.exports = {
id: 'ad923617-e76e-418e-9f23-490738a32299',
tags: ['theme', 'dark'],
name: 'littlepig dark',
desc: 'a purple monospaced theme using emojis and colourful text.',
version: '0.1.2',
author: {
name: 'Lizishan',
link: 'https://www.reddit.com/user/Lizishan/',
avatar:
'https://styles.redditmedia.com/t5_110nz4/styles/profileIcon_h1m3b16exoi51.jpg',
},
};

View File

@ -1,125 +0,0 @@
/*
* littlepig
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com>
* (c) 2020 Lizishan
* under the MIT license
*/
@import 'https://dev-cats.github.io/code-snippets/JetBrainsMono.css';
:root {
--theme_dark--main: #1e1c26;
--theme_dark--sidebar: #24222c;
--theme_dark--dragarea: #19181f;
--theme_dark--font_sans: 'JetBrains Mono';
--theme_dark--font_serif: 'JetBrains Mono';
--theme_dark--font_mono: 'JetBrains Mono';
--theme_dark--font_code: 'JetBrains Mono';
--theme_dark--scrollbar: #221f29;
--theme_dark--scrollbar_hover: #312d3c;
--theme_dark--card: #24222c;
--theme_dark--gallery: rgba(162, 162, 162, 0.01);
--theme_dark--table-border: rgba(148, 148, 184, 0.5);
--theme_dark--interactive_hover: #282632;
--theme_dark--selected: #9500ff6b;
--theme_dark--primary: rgb(106, 47, 200);
--theme_dark--primary_hover: rgb(110, 48, 211);
--theme_dark--primary_click: rgb(117, 65, 200);
--theme_dark--primary_indicator: rgb(150, 84, 226);
--theme_dark--option_hover-background: rgb(20, 0, 51);
--theme_dark--text: rgba(200, 200, 200, 0.8);
/* 文本颜色 */
--theme_dark--text_brown: rgb(177, 144, 131);
--theme_dark--text_green: rgb(66, 222, 137);
--theme_dark--text_blue: rgb(0, 157, 255);
--theme_dark--text_purple: rgb(162, 94, 255);
--theme_dark--text_red: rgb(240, 52, 38);
/* 文本背景色 */
--theme_dark--line_gray: rgb(69, 75, 78);
--theme_dark--line_brown: rgb(78, 57, 48);
--theme_dark--line_orange: rgb(136, 80, 48);
--theme_dark--line_yellow: #fbe2287c;
--theme_dark--line_red: rgb(151, 62, 62);
/* 标题色 */
--littlepig_dark--h1_text: #c264fe;
--littlepig_dark--h2_text: #e2bafe;
--littlepig_dark--h3_text: #7b08fa;
/* todo */
--theme_dark--option_active-color: #7b08fa;
--theme_dark--option_active-background: #1d1c26;
/* inline code */
--theme_dark--code_inline-text: #e0dfe2;
--theme_dark--code_inline-background: rgb(179, 39, 39);
--theme_dark--code_function: rgb(179, 146, 240);
--theme_dark--code_number: hsl(159, 69%, 39%);
/* 标签颜色 + 文本背景色 */
--theme_dark--bg_gray: rgb(234, 234, 234);
--theme_dark--bg_gray-text: rgb(17, 17, 17);
--theme_dark--bg_brown: rgb(206, 206, 206);
--theme_dark--bg_brown-text: rgb(85, 35, 1);
--theme_dark--bg_orange: rgb(254, 214, 155);
--theme_dark--bg_orange-text: rgb(199, 110, 0);
--theme_dark--bg_yellow: #fcffd8;
--theme_dark--bg_yellow-text: #ff8c22;
--theme_dark--bg_green: #d5fded;
--theme_dark--bg_green-text: #006a00;
--theme_dark--bg_blue: #e2f5ff;
--theme_dark--bg_blue-text: #00b2ff;
--theme_dark--bg_purple: #efe6ff;
--theme_dark--bg_purple-text: #8334ff;
--theme_dark--bg_pink: #ffe9f1;
--theme_dark--bg_pink-text: rgb(255, 0, 127);
--theme_dark--bg_red: rgb(251, 228, 228);
--theme_dark--bg_red-text: rgb(138, 0, 10);
--theme_dark--select_gray: rgb(234, 234, 234);
--theme_dark--select_gray-text: rgb(17, 17, 17);
--theme_dark--select_brown: rgb(206, 206, 206);
--theme_dark--select_brown-text: rgb(85, 35, 1);
--theme_dark--select_orange: rgb(254, 214, 155);
--theme_dark--select_orange-text: rgb(199, 110, 0);
--theme_dark--select_yellow: #fcffd8;
--theme_dark--select_yellow-text: #ff8c22;
--theme_dark--select_green: #d5fded;
--theme_dark--select_green-text: #006a00;
--theme_dark--select_blue: #e2f5ff;
--theme_dark--select_blue-text: #00b2ff;
--theme_dark--select_purple: #efe6ff;
--theme_dark--select_purple-text: #8334ff;
--theme_dark--select_pink: #ffe9f1;
--theme_dark--select_pink-text: rgb(255, 0, 127);
--theme_dark--select_red: rgb(251, 228, 228);
--theme_dark--select_red-text: rgb(138, 0, 10);
/* callout 颜色 */
--theme_dark--callout_gray: #e2e3e5;
--theme_dark--callout_gray-text: #383d41;
--theme_dark--callout_brown: rgb(130, 118, 111);
--theme_dark--callout_brown-text: rgb(85, 35, 1);
--theme_dark--callout_orange: rgb(254, 214, 155);
--theme_dark--callout_orange-text: rgb(255, 140, 0);
--theme_dark--callout_yellow: #fcffd8;
--theme_dark--callout_yellow-text: #c76e00;
--theme_dark--callout_green: #d4edda;
--theme_dark--callout_green-text: #155724;
--theme_dark--callout_blue: #cce5ff;
--theme_dark--callout_blue-text: #004085;
--theme_dark--callout_purple: rgb(199, 178, 230);
--theme_dark--callout_purple-text: rgb(90, 49, 148);
--theme_dark--callout_pink: rgb(255, 206, 228);
--theme_dark--callout_pink-text: rgb(255, 0, 127);
--theme_dark--callout_red: #f8d7da;
--theme_dark--callout_red-text: #721c24;
}

View File

@ -1,93 +0,0 @@
/*
* littlepig
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com>
* (c) 2020 Lizishan
* under the MIT license
*/
/* todo 颜色 */
.notion-body:not(.dark)
.notion-light-theme
[style*='background: rgb(46, 170, 220)'],
.notion-body:not(.dark)
.notion-light-theme
[style*='background-color: rgb(46, 170, 220)'] {
background: var(--theme_dark--option_active-background) !important;
}
.notion-body:not(.dark) [style*='background: rgb(46, 170, 220)'][role='button'],
.notion-body:not(.dark)
[style*='background: rgb(46, 170, 220);'][style*='width: 26px'] {
background: var(--theme_light--primary) !important;
}
/* ===================== header =========================== */
.notion-body:not(.dark) [placeholder*='Heading 1'] {
color: var(--littlepig_light--h1_text) !important;
}
.notion-body:not(.dark) [placeholder*='Heading 2'] {
margin-bottom: 16px;
border-bottom: 4px solid var(--littlepig_light--h2_text);
display: inline-block;
color: var(--littlepig_light--h2_text) !important;
width: auto !important;
padding: 6px 12px 6px 0 !important;
position: relative;
}
.notion-body:not(.dark) [placeholder*='Heading 2']::before {
content: '🔥 ';
}
.notion-body:not(.dark) [placeholder*='Heading 3'] {
width: fit-content !important;
padding: 4px 10px !important;
border-radius: 10px;
border: 2px solid #42b983;
color: var(--littlepig_light--h3_text) !important;
background-color: #fbf8e7;
display: inline-block;
margin-bottom: 14px;
}
.notion-body:not(.dark) [placeholder*='Heading 3']::before {
content: '📌 ';
}
/* list 样式 */
.notion-body:not(.dark)
[style*='font-size: 1.5em; line-height: 1; margin-bottom: 0.1em;'] {
color: #41b983 !important;
}
/* quoteblock 样式 */
.notion-body:not(.dark) .notion-quote-block [style*='rgb(55, 53, 47);'] {
font-size: 0.85em !important;
border-left: none !important;
padding: 0.5em 0.5em 0.5em 1.9em !important;
position: relative;
margin: 10px 0;
background: var(--theme_light--card);
border-radius: 3px;
}
.notion-body:not(.dark)
.notion-quote-block
[style*='caret-color: rgb(55, 53, 47);']::before {
content: '\201C';
font-family: Georgia, serif;
font-size: 44px;
font-weight: bold;
color: #42b983;
position: absolute;
left: 0px;
top: -24px;
}
/* link style */
.notion-body:not(.dark) .notion-link-token span {
border-bottom: 0.05em solid;
border-color: rgb(233, 51, 38) !important;
border-width: 3px !important;
opacity: 1 !important;
}
.notion-body:not(.dark) .notion-link-token span:hover {
color: rgb(233, 51, 38) !important;
}

View File

@ -1,22 +0,0 @@
/*
* littlepig
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 Lizishan
* under the MIT license
*/
'use strict';
module.exports = {
id: 'ad923617-e76e-408e-9f23-490738a32238',
tags: ['theme', 'light'],
name: 'littlepig light',
desc: 'a bright monospaced theme using emojis and colourful text.',
version: '0.1.1',
author: {
name: 'Lizishan',
link: 'https://www.reddit.com/user/Lizishan/',
avatar:
'https://styles.redditmedia.com/t5_110nz4/styles/profileIcon_h1m3b16exoi51.jpg',
},
};

View File

@ -1,104 +0,0 @@
/*
* littlepig
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com>
* (c) 2020 Lizishan
* under the MIT license
*/
@import 'https://dev-cats.github.io/code-snippets/JetBrainsMono.css';
:root {
--theme_light--font_sans: 'JetBrains Mono';
--theme_light--font_serif: 'JetBrains Mono';
--theme_light--font_mono: 'JetBrains Mono';
--theme_light--font_code: 'JetBrains Mono';
--theme_light--selected: rgba(177, 24, 24, 0.22);
--theme_light--primary: rgb(177, 24, 24);
--theme_light--primary_hover: rgb(202, 26, 26);
--theme_light--primary_click: rgb(219, 41, 41);
--theme_light--primary_indicator: rgb(202, 26, 26);
/* 文本颜色 */
--theme_light--text_gray: rgba(151, 154, 155, 0.95);
--theme_light--text_brown: rgb(167, 126, 100);
--theme_light--text_orange: rgb(255, 134, 0);
--theme_light--text_yellow: rgb(255, 195, 0);
--theme_light--text_green: rgb(0, 171, 0);
--theme_light--text_blue: rgb(0, 121, 255);
--theme_light--text_purple: rgb(126, 0, 255);
--theme_light--text_pink: rgb(255, 0, 208);
--theme_light--text_red: rgb(255, 0, 0);
/* 文本背景色 */
--theme_light--bg_gray: rgb(234, 234, 234);
--theme_light--bg_gray-text: rgb(17, 17, 17);
--theme_light--bg_brown: rgb(206, 206, 206);
--theme_light--bg_brown-text: rgb(85, 35, 1);
--theme_light--bg_orange: rgb(254, 214, 155);
--theme_light--bg_orange-text: rgb(199, 110, 0);
--theme_light--bg_yellow: #fcffd8;
--theme_light--bg_yellow-text: #ff8c22;
--theme_light--bg_green: #d5fded;
--theme_light--bg_green-text: #006a00;
--theme_light--bg_blue: #e2f5ff;
--theme_light--bg_blue-text: #00b2ff;
--theme_light--bg_purple: #efe6ff;
--theme_light--bg_purple-text: #8334ff;
--theme_light--bg_pink: #ffe9f1;
--theme_light--bg_pink-text: rgb(255, 0, 127);
--theme_light--bg_red: rgb(248, 215, 218);
--theme_light--bg_red-text: rgb(138, 0, 10);
--theme_light--select_gray: rgb(234, 234, 234);
--theme_light--select_gray-text: rgb(17, 17, 17);
--theme_light--select_brown: rgb(206, 206, 206);
--theme_light--select_brown-text: rgb(85, 35, 1);
--theme_light--select_orange: rgb(254, 214, 155);
--theme_light--select_orange-text: rgb(199, 110, 0);
--theme_light--select_yellow: #fcffd8;
--theme_light--select_yellow-text: #ff8c22;
--theme_light--select_green: #d5fded;
--theme_light--select_green-text: #006a00;
--theme_light--select_blue: #e2f5ff;
--theme_light--select_blue-text: #00b2ff;
--theme_light--select_purple: #efe6ff;
--theme_light--select_purple-text: #8334ff;
--theme_light--select_pink: #ffe9f1;
--theme_light--select_pink-text: rgb(255, 0, 127);
--theme_light--select_red: rgb(248, 215, 218);
--theme_light--select_red-text: rgb(138, 0, 10);
/* 标题色 */
--littlepig_light--h1_text: #008800;
--littlepig_light--h2_text: #006a00;
--littlepig_light--h3_text: #003e00;
/* todo */
--theme_light--option_active-color: #008800;
--theme_light--option_active-background: #ffffff;
/* inline code */
--theme_light--code_inline-text: #e0dfe2;
--theme_light--code_inline-background: rgb(179, 39, 39);
/* callout 颜色 */
--theme_light--callout_gray: #e2e3e5;
--theme_light--callout_gray-text: #383d41;
--theme_light--callout_brown: rgb(130, 118, 111);
--theme_light--callout_brown-text: rgb(85, 35, 1);
--theme_light--callout_orange: rgb(254, 214, 155);
--theme_light--callout_orange-text: rgb(255, 140, 0);
--theme_light--callout_yellow: #fcffd8;
--theme_light--callout_yellow-text: #c76e00;
--theme_light--callout_green: #d4edda;
--theme_light--callout_green-text: #155724;
--theme_light--callout_blue: #cce5ff;
--theme_light--callout_blue-text: #004085;
--theme_light--callout_purple: rgb(199, 178, 230);
--theme_light--callout_purple-text: rgb(90, 49, 148);
--theme_light--callout_pink: rgb(255, 206, 228);
--theme_light--callout_pink-text: rgb(255, 0, 127);
--theme_light--callout_red: #f8d7da;
--theme_light--callout_red-text: #721c24;
}

View File

@ -1,16 +0,0 @@
/*
* material ocean
* (c) 2020 Abubakar Yagoub <i@blacksuan19.me> (https://blacksuan19.tk)
* under the MIT license
*/
'use strict';
module.exports = {
id: '69e7ccb2-4aef-484c-876d-3de1b433d2b9',
tags: ['theme', 'dark'],
name: 'material ocean',
desc: 'an oceanic colour palette.',
version: '0.1.0',
author: 'blacksuan19',
};

View File

@ -1,126 +0,0 @@
/*
* material ocean
* (c) 2020 Abubakar Yagoub <i@blacksuan19.me> (https://blacksuan19.tk)
* under the MIT license
*/
:root {
--ocean-main: #0f111a;
--ocean-sec: #00010a;
--ocean-tet: #000108;
--ocean-accent: #ff4151;
--ocean-gray: #e0e0e0;
--ocean-brown: #d8b6a6;
--ocean-orange: #fde3c0;
--ocean-yellow: #ebcb8b;
--ocean-green: #a3be8c;
--ocean-blue: #81a1c1;
--ocean-purple: #b48ead;
--ocean-pink: #ffc0cb;
--ocean-red: #bf616a;
--theme_dark--main: var(--ocean-main);
--theme_dark--sidebar: var(--ocean-sec);
--theme_dark--overlay: rgba(0, 1, 10, 0.5);
--theme_dark--dragarea: var(--ocean-sec);
--theme_dark--scrollbar: var(--ocean-sec);
--theme_dark--scrollbar_hover: var(--ocean-accent);
--theme_dark--card: var(--ocean-sec);
--theme_dark--gallery: var(--ocean-sec);
--theme_dark--select_input: var(--ocean-tet);
--theme_dark--table-border: rgba(255, 255, 255, 0.1);
--theme_dark--ui-border: var(--theme_dark--table-border);
--theme_dark--interactive_hover: var(--ocean-tet);
--theme_dark--button_close: var(--ocean-accent);
--theme_dark--selected: rgba(255, 65, 81, 0.2);
--theme_dark--primary: var(--ocean-accent);
--theme_dark--primary_hover: var(--ocean-accent);
--theme_dark--primary_click: var(--ocean-sec);
--theme_dark--primary_indicator: var(--ocean-accent);
--theme_dark--option_active-background: var(--theme_dark--primary);
--theme_dark--option_hover-background: var(--theme_dark--primary_hover);
--theme_dark--danger_text: #eb5757;
--theme_dark--danger_border: rgba(235, 87, 87, 0.5);
--theme_dark--text: #ffffff;
--theme_dark--text_ui: var(--ocean-gray);
--theme_dark--text_ui_info: var(--ocean-gray);
--theme_dark--text_gray: var(--ocean-gray);
--theme_dark--text_brown: var(--ocean-brown);
--theme_dark--text_orange: var(--ocean-orange);
--theme_dark--text_yellow: var(--ocean-yellow);
--theme_dark--text_green: var(--ocean-green);
--theme_dark--text_blue: var(--ocean-blue);
--theme_dark--text_purple: var(--ocean-purple);
--theme_dark--text_pink: var(--ocean-pink);
--theme_dark--text_red: var(--ocean-red);
--theme_dark--bg-text: var(--ocean-main);
--theme_dark--bg_gray: var(--ocean-gray);
--theme_dark--bg_brown: var(--ocean-brown);
--theme_dark--bg_orange: var(--ocean-orange);
--theme_dark--bg_yellow: var(--ocean-yellow);
--theme_dark--bg_green: var(--ocean-green);
--theme_dark--bg_blue: var(--ocean-blue);
--theme_dark--bg_purple: var(--ocean-purple);
--theme_dark--bg_pink: var(--ocean-pink);
--theme_dark--bg_red: var(--ocean-red);
--theme_dark--line-text: var(--ocean-main);
--theme_dark--line_gray: #e0e0e089;
--theme_dark--line_brown: #d8b6a692;
--theme_dark--line_orange: #fde3c09f;
--theme_dark--line_yellow: #ffe6a6ad;
--theme_dark--line_green: #a3be8ca3;
--theme_dark--line_blue: #81a1c1a3;
--theme_dark--line_purple: #b48eada8;
--theme_dark--line_pink: #ffc0cbb1;
--theme_dark--line_red: #bf616a9e;
--theme_dark--select-text: var(--theme_dark--bg-text);
--theme_dark--select_gray: var(--theme_dark--bg_gray);
--theme_dark--select_brown: var(--theme_dark--bg_brown);
--theme_dark--select_orange: var(--theme_dark--bg_orange);
--theme_dark--select_yellow: var(--theme_dark--bg_yellow);
--theme_dark--select_green: var(--theme_dark--bg_green);
--theme_dark--select_blue: var(--theme_dark--bg_blue);
--theme_dark--select_purple: var(--theme_dark--bg_purple);
--theme_dark--select_pink: var(--theme_dark--bg_pink);
--theme_dark--select_red: var(--theme_dark--bg_red);
--theme_dark--callout-text: var(--theme_dark--line-text);
--theme_dark--callout_gray: var(--theme_dark--line_gray);
--theme_dark--callout_brown: var(--theme_dark--line_brown);
--theme_dark--callout_orange: var(--theme_dark--line_orange);
--theme_dark--callout_yellow: var(--theme_dark--line_yellow);
--theme_dark--callout_green: var(--theme_dark--line_green);
--theme_dark--callout_blue: var(--theme_dark--line_blue);
--theme_dark--callout_purple: var(--theme_dark--line_purple);
--theme_dark--callout_pink: var(--theme_dark--line_pink);
--theme_dark--callout_red: var(--theme_dark--line_red);
--theme_dark--code_inline-text: #b3f5c8;
--theme_dark--code_inline-background: var(--ocean-sec);
--theme_dark--code-text: var(--theme_dark--text);
--theme_dark--code-background: var(--ocean-sec);
--theme_dark--code_function: var(--theme_dark--text_blue);
--theme_dark--code_keyword: var(--theme_dark--text_pink);
--theme_dark--code_tag: var(--theme_dark--text_pink);
--theme_dark--code_operator: var(--theme_dark--text_yellow);
--theme_dark--code_important: var(--theme_dark--text_yellow);
--theme_dark--code_property: var(--theme_dark--text_pink);
--theme_dark--code_builtin: var(--theme_dark--text_yellow);
--theme_dark--code_attr-name: var(--theme_dark--text_yellow);
--theme_dark--code_comment: var(--theme_dark--text_gray);
--theme_dark--code_punctuation: var(--theme_dark--text_gray);
--theme_dark--code_doctype: var(--theme_dark--text_gray);
--theme_dark--code_number: var(--theme_dark--text_purple);
--theme_dark--code_string: var(--theme_dark--text_orange);
--theme_dark--code_attr-value: var(--theme_dark--text_orange);
}

View File

@ -1,19 +0,0 @@
/*
* neutral
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 Arecsu
* under the MIT license
*/
.notion-dark-theme [placeholder='Heading 1'],
.notion-dark-theme [placeholder='Heading 2'],
.notion-dark-theme [placeholder='Heading 3'] {
padding: 3px 1px !important;
}
/* hide sidebar "new page" button */
.notion-dark-theme
.notion-sidebar
> [style*='flex: 0 0 auto; margin-top: auto;'] {
display: none !important;
}

View File

@ -1,17 +0,0 @@
/*
* neutral
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 Arecsu
* under the MIT license
*/
'use strict';
module.exports = {
id: 'c4435543-4705-4d68-8cf7-d11c342f8089',
tags: ['theme', 'dark'],
name: 'neutral',
desc: 'smoother colours and fonts, designed to be more pleasing to the eye.',
version: '0.1.4',
author: 'arecsu',
};

View File

@ -1,134 +0,0 @@
/*
* neutral
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 Arecsu
* under the MIT license
*/
@import 'https://rsms.me/inter/inter.css';
@import 'https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400&display=swap';
:root {
/** dark **/
--theme_dark--main: #131313;
--theme_dark--sidebar: #161616;
--theme_dark--overlay: rgba(15, 15, 15, 0.6);
--theme_dark--dragarea: #111111;
--theme_dark--box-shadow: rgba(15, 15, 15, 0.5) 0px 0px 0px 1px,
rgba(15, 15, 15, 0.5) 0px 2px 4px;
--theme_dark--font_sans: 'Inter', -apple-system, BlinkMacSystemFont,
'Segoe UI', Helvetica, 'Apple Color Emoji', Arial, sans-serif,
'Segoe UI Emoji', 'Segoe UI Symbol';
--theme_dark--font_mono: 'Roboto Mono', iawriter-mono, Nitti, Menlo, Courier,
monospace;
--theme_dark--font_code: 'Roboto Mono', SFMono-Regular, Consolas,
'Liberation Mono', Menlo, Courier, monospace;
/* 1.3 supreme ratio. https://www.modularscale.com/ */
--theme_dark--font_title-size: 33px;
--theme_dark--font_heading1-size: 2.2em;
--theme_dark--font_heading2-size: 1.687em;
--theme_dark--font_heading3-size: 1.3em;
--theme_dark--font_label-size: 14px;
--theme_dark--font_body-size: 15px;
--theme_dark--font_body-size_small: 13.5px;
--theme_dark--font_code-size: 0.9em;
--theme_dark--font_sidebar-size: 14px;
--theme_dark--scrollbar: #232425;
--theme_dark--scrollbar-border: transparent;
--theme_dark--scrollbar_hover: #373838;
--theme_dark--card: #181818;
--theme_dark--gallery: rgba(105, 105, 105, 0.05);
--theme_dark--select_input: #1d1d1d;
--theme_dark--table-border: rgba(78, 78, 78, 0.7);
--theme_dark--ui-border: var(--theme_dark--table-border);
--theme_dark--interactive_hover: rgb(29, 29, 29);
--theme_dark--selected: #52525244;
--theme_dark--primary: #404040;
--theme_dark--primary_hover: #6d6d6d;
--theme_dark--primary_click: #cacaca;
--theme_dark--primary_indicator: #6d6d6d;
--theme_dark--option_hover-background: #484848;
--theme_dark--danger_text: #ce535f;
--theme_dark--danger_border: #8c3d3d;
--theme_dark--text: #dadada;
--theme_dark--text_ui: #dadadad0;
--theme_dark--text_ui_info: #dadadab4;
--theme_dark--text_gray: #858585;
--theme_dark--text_brown: #484848;
--theme_dark--text_orange: #ec9873;
--theme_dark--text_yellow: #e2c06f;
--theme_dark--text_green: #92b178;
--theme_dark--text_blue: #719cca;
--theme_dark--text_purple: #ab82bb;
--theme_dark--text_pink: #d285aa;
--theme_dark--text_red: #ce535f;
--theme_dark--bg_gray: #585858;
--theme_dark--bg_brown: #333333;
--theme_dark--bg_orange: #9a5a3f;
--theme_dark--bg_yellow: #b58a46;
--theme_dark--bg_green: #657953;
--theme_dark--bg_blue: #355475;
--theme_dark--bg_purple: #775186;
--theme_dark--bg_pink: #8e4b63;
--theme_dark--bg_red: #8c3d3d;
--theme_dark--line_gray: #585858;
--theme_dark--line_brown: #333333;
--theme_dark--line_orange: #9a5a3f;
--theme_dark--line_yellow: #b58a46;
--theme_dark--line_green: #657953;
--theme_dark--line_blue: #355475;
--theme_dark--line_purple: #775186;
--theme_dark--line_pink: #8e4b63;
--theme_dark--line_red: #8c3d3d;
--theme_dark--select_gray: var(--theme_dark--bg_gray);
--theme_dark--select_brown: var(--theme_dark--bg_brown);
--theme_dark--select_orange: var(--theme_dark--bg_orange);
--theme_dark--select_yellow: var(--theme_dark--bg_yellow);
--theme_dark--select_green: var(--theme_dark--bg_green);
--theme_dark--select_blue: var(--theme_dark--bg_blue);
--theme_dark--select_purple: var(--theme_dark--bg_purple);
--theme_dark--select_pink: var(--theme_dark--bg_pink);
--theme_dark--select_red: var(--theme_dark--bg_red);
--theme_dark--callout_gray: rgba(88, 88, 88, 0.175);
--theme_dark--callout_brown: rgb(51, 51, 51, 0.175);
--theme_dark--callout_orange: rgb(154, 90, 63, 0.175);
--theme_dark--callout_yellow: rgb(181, 138, 70, 0.175);
--theme_dark--callout_green: rgb(101, 121, 83, 0.175);
--theme_dark--callout_blue: rgb(53, 84, 117, 0.175);
--theme_dark--callout_purple: rgb(119, 81, 134, 0.175);
--theme_dark--callout_pink: rgb(142, 75, 99, 0.175);
--theme_dark--callout_red: rgb(140, 61, 61, 0.175);
--theme_dark--code_inline-text: var(--theme_dark--text);
--theme_dark--code_inline-background: #333333;
--theme_dark--code-text: var(--theme_dark--text);
--theme_dark--code-background: #0e0e0e;
--theme_dark--code_function: var(--theme_dark--text_blue);
--theme_dark--code_keyword: var(--theme_dark--text_pink);
--theme_dark--code_tag: var(--theme_dark--text_pink);
--theme_dark--code_operator: var(--theme_dark--text_yellow);
--theme_dark--code_important: var(--theme_dark--text_yellow);
--theme_dark--code_property: var(--theme_dark--text_pink);
--theme_dark--code_builtin: var(--theme_dark--text_yellow);
--theme_dark--code_attr-name: var(--theme_dark--text_yellow);
--theme_dark--code_comment: var(--theme_dark--text_gray);
--theme_dark--code_punctuation: var(--theme_dark--text_gray);
--theme_dark--code_doctype: var(--theme_dark--text_gray);
--theme_dark--code_number: var(--theme_dark--text_purple);
--theme_dark--code_string: var(--theme_dark--text_orange);
--theme_dark--code_attr-value: var(--theme_dark--text_orange);
}

View File

@ -1,47 +0,0 @@
/*
* night shift
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* under the MIT license
*/
'use strict';
module.exports = {
id: '9a71bbff-e87d-4a0b-8a2c-a93473113c30',
tags: ['extension', 'theme'],
name: 'night shift',
desc:
'sync dark/light theme with the system (overrides normal theme setting).',
version: '0.1.2',
author: 'dragonwocky',
hacks: {
'renderer/preload.js'(store, __exports) {
document.addEventListener('readystatechange', (event) => {
if (document.readyState !== 'complete') return false;
const attempt_interval = setInterval(enhance, 500);
function enhance() {
const notion_elem = document.querySelector('.notion-app-inner');
if (!notion_elem) return;
clearInterval(attempt_interval);
handle([{ target: notion_elem }]);
const observer = new MutationObserver(handle);
observer.observe(notion_elem, {
attributes: true,
subtree: true,
});
function handle(list, observer) {
const mode = `notion-app-inner notion-${
window.matchMedia('(prefers-color-scheme: dark)').matches
? 'dark'
: 'light'
}-theme`;
if (notion_elem.className !== mode) notion_elem.className = mode;
window
.matchMedia('(prefers-color-scheme: dark)')
.addEventListener('change', handle);
}
}
});
},
},
};

View File

@ -1,252 +0,0 @@
/*
* notion-icons
* (c) 2019 jayhxmo (https://jaymo.io/)
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 CloudHill
* under the MIT license
*/
.hide-active-bar > :nth-child(2) {
display: none;
}
.notion-icons--tab,
.notion-icons--tab > div {
color: var(--theme--text) !important;
}
.notion-icons--tab > div:hover,
.notion-icons--icon:hover,
.notion-icons--toggle:hover,
.notion-icons--restore-button:hover,
.notion-icons--removed-set:hover {
background: var(--theme--interactive_hover);
box-shadow: 0 0 0 0.5px var(--theme--interactive_hover-border) !important;
}
#notion-icons {
position: absolute;
top: 1px;
left: 0;
right: 0;
bottom: 0;
z-index: 9999;
display: flex;
flex-direction: column;
align-items: stretch;
background: var(--theme--card);
border-radius: 3px;
padding: 8px 12px;
overflow-x: hidden;
overflow-y: scroll;
}
.notion-icons--icon-set {
margin-bottom: 8px;
color: var(--theme--text);
font-size: 11px;
line-height: 1.5;
text-transform: uppercase;
letter-spacing: 1px;
font-weight: 600;
border-radius: 2px;
}
.notion-icons--icon-set.error {
color: var(--theme--text_red);
background: var(--theme--line_red);
border: 1px solid var(--theme--select_red);
padding: 8px 16px;
}
.notion-icons--icon-set.error::after {
content: '!';
display: block;
font-size: 1.6em;
line-height: 0.9;
float: right;
}
.notion-icons--toggle {
display: flex;
align-items: center;
user-select: none;
cursor: pointer;
margin-bottom: 8px;
padding: 0.25em;
border-radius: 2px;
transition: background 200ms, margin-bottom 200ms ease-in;
}
.notion-icons--toggle .triangle {
flex-grow: 0;
flex-shrink: 0;
width: 0.9em;
height: 1em;
margin: 0 0.75em 0 0.5em;
transition: transform 200ms ease-out 0s;
transform: rotateZ(180deg);
}
.notion-icons--toggle a {
color: var(--theme-text);
transition: color 20ms ease-in;
}
.notion-icons--toggle a:hover {
color: var(--theme--primary);
}
.notion-icons--icon-set.alert .notion-icons--toggle {
color: var(--theme--line_yellow-text);
background: var(--theme--line_yellow);
border: 1px solid var(--theme--select_yellow);
margin-left: -1px;
margin-right: -1px;
}
.notion-icons--icon-set.alert .notion-icons--toggle:hover {
background: var(--theme--select_yellow);
}
.notion-icons--body {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
flex-grow: 1;
margin-left: 1.2em;
overflow: hidden;
transition: height 200ms ease-in, opacity 200ms ease-in;
}
.hidden-set {
padding-bottom: 0;
}
.hidden-set .notion-icons--toggle {
margin-bottom: 0;
}
.hidden-set .triangle {
transform: rotateZ(90deg);
}
.hidden-set .notion-icons--body {
opacity: 0;
}
.notion-icons--icon {
cursor: pointer;
user-select: none;
transition: background 20ms ease-in;
display: flex;
align-items: center;
justify-content: center;
border-radius: 3px;
width: 40px;
height: 40px;
padding: 4px;
}
.notion-icons--icon img {
width: 100%;
height: 100%;
}
.notion-icons--icon.error {
font-size: 20px;
background: var(--theme--line_yellow);
border: 1px solid var(--theme--select_yellow);
color: var(--theme--text_yellow);
}
.notion-icons--icon.error:hover {
background: var(--theme--select_yellow);
}
.notion-icons--extra {
flex-grow: 0;
flex-shrink: 0;
margin-left: auto;
display: flex;
align-items: center;
}
.notion-icons--spinner {
width: 12px;
height: 12px;
}
.notion-icons--spinner img {
width: 100%;
height: 100%;
animation: rotation 1.3s infinite linear;
}
.notion-icons--remove-button {
display: flex;
justify-content: center;
align-items: center;
margin-left: 8px;
width: 16px;
height: 16px;
position: relative;
}
.notion-icons--remove-button::before {
content: 'Hide icon set';
position: absolute;
right: -3px;
padding: 4px 22px 4px 6px;
background: var(--theme--main);
box-shadow: var(--theme--box-shadow);
white-space: nowrap;
opacity: 0;
pointer-events: none;
transition: opacity 50ms ease-in;
}
.notion-icons--remove-button:hover::before {
opacity: 1;
pointer-events: auto;
}
.notion-icons--remove-button svg {
width: 100%;
height: 100%;
fill: inherit;
z-index: 1;
}
.notion-icons--restore-button svg {
width: 16px;
height: 16px;
fill: inherit;
}
.notion-icons--overlay-container {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 999;
overflow: hidden;
}
.notion-icons--restore {
max-width: 320px;
max-height: 320px;
position: relative;
border-radius: 3px;
padding: 8px 0;
box-shadow: var(--theme--box-shadow_strong);
background: var(--theme--card);
overflow: hidden auto;
}
.notion-icons--removed-set {
display: flex;
align-items: center;
width: 100%;
padding: 8px 14px;
user-select: none;
cursor: pointer;
transition: background 0.4s ease;
}
@keyframes rotation {
from {
transform: rotate(0deg);
}
to {
transform: rotate(359deg);
}
}

View File

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<polygon class="cls-1" points="18.72 16.6 14.12 12 18.72 7.4 16.6 5.28 12 9.88 7.4 5.28 5.28 7.4 9.88 12 5.28 16.6 7.4 18.72 12 14.12 16.6 18.72 18.72 16.6"/>
</svg>

Before

Width:  |  Height:  |  Size: 251 B

View File

@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<polygon class="cls-1" points="20 10.5 13.5 10.5 13.5 4 10.5 4 10.5 10.5 4 10.5 4 13.5 10.5 13.5 10.5 20 13.5 20 13.5 13.5 20 13.5 20 10.5"/>
</svg>

Before

Width:  |  Height:  |  Size: 234 B

View File

@ -1,489 +0,0 @@
/*
* notion-icons
* (c) 2019 jayhxmo (https://jaymo.io/)
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 CloudHill
* under the MIT license
*/
'use strict';
const { createElement } = require('../../pkg/helpers.js'),
fs = require('fs-extra'),
path = require('path');
module.exports = {
id: '2d1f4809-9581-40dd-9bf3-4239db406483',
tags: ['extension'],
name: 'notion icons',
desc:
'use custom icon sets directly in notion.',
version: '1.0.0',
author: 'jayhxmo',
options: [
{
key: 'hide',
label: 'hide icon sets by default.',
type: 'toggle',
value: false,
},
{
key: 'json',
label: 'insert custom json',
type: 'file',
extensions: ['json'],
},
],
hacks: {
'renderer/preload.js'(store, __exports) {
let garbageCollector = [];
const iconsUrl = 'https://raw.githubusercontent.com/notion-enhancer/icons/main/';
function getAsync(urlString, callback) {
let httpReq = new XMLHttpRequest();
httpReq.onreadystatechange = function() {
if (httpReq.readyState == 4 && httpReq.status == 200) callback(httpReq.responseText);
};
httpReq.open('GET', urlString, true);
httpReq.send(null);
}
let modalIcons;
(async () => {
modalIcons = {
remove: await fs.readFile( path.resolve(__dirname, 'icons/remove.svg') ),
restore: await fs.readFile( path.resolve(__dirname, 'icons/restore.svg') ),
}
})();
// Retrieve icons data
let notionIconsData;
getAsync(iconsUrl + 'icons.json', iconsData => {
notionIconsData = JSON.parse(iconsData);
});
// Retrieve custom icons data
let customIconsData;
if (store().json) {
customIconsData = JSON.parse(
fs.readFileSync(store().json)
)
}
function getTab(n, button = false) {
return document.querySelector(
`.notion-media-menu > :first-child > :first-child > :nth-child(${n}) ${button ? 'div' : ''}`
);
}
function isCurrentTab(n) {
return getTab(n).childNodes.length > 1;
}
// Submits the icon's url as an image link
function setPageIcon(iconUrl) {
const input = document.querySelector('input[type=url]');
const nativeInputValueSetter = Object.getOwnPropertyDescriptor(
window.HTMLInputElement.prototype, 'value'
).set;
nativeInputValueSetter.call(input, iconUrl);
input.dispatchEvent(
new Event('input', { bubbles: true })
);
input.dispatchEvent(
new KeyboardEvent('keydown', { bubbles: true, cancelable: true, keyCode: 13 })
);
removeIcons();
}
function addIconsTab() {
// Prevent icons tab duplication
if (getTab(5)) {
removeIcons();
return;
}
// Change 'Upload an image' to 'Upload'
getTab(2, true).innerText = 'Upload';
// Initialize icons tab
const iconsTab = getTab(3).cloneNode(true);
iconsTab.className = 'notion-icons--tab';
iconsTab.firstChild.innerText = 'Icons';
iconsTab.firstChild.addEventListener('click', renderIconsOverlay);
// Insert icons tab
const tabStrip = getTab(1).parentElement;
tabStrip.insertBefore(iconsTab, tabStrip.lastChild);
// Remove the icons overlay when clicking...
const closeTriggers = [
// The fog layer
document.querySelector('.notion-overlay-container [style*="width: 100vw; height: 100vh;"]'),
// The first three buttons
...Array.from( Array(3), (e, i) => getTab(i + 1, true) ),
// The remove button
getTab(5).lastChild,
];
closeTriggers.forEach(trigger => {
trigger.addEventListener('click', removeIcons);
garbageCollector.push(trigger);
})
// Remove the icons overlay when pressing the Escape key
document.querySelector('.notion-media-menu')
.addEventListener('keydown', e => {
if (e.keyCode === 27) removeIcons();
});
}
function addRestoreButton() {
const buttons = getTab(5) ? getTab(5) : getTab(4);
const restoreButton = buttons.lastChild.cloneNode(true);
restoreButton.className = 'notion-icons--restore-button';
restoreButton.innerHTML = modalIcons.restore;
buttons.prepend(restoreButton);
restoreButton.addEventListener('click', renderRestoreOverlay);
}
function renderRestoreOverlay() {
if (!store().removedSets) return;
store().removedSets.sort((a, b) => {
const setA = a.name.toLowerCase(),
setB = b.name.toLowerCase();
if (setA < setB) return -1;
if (setA > setB) return 1;
return 0;
});
const overlayContainer = createElement(`
<div class="notion-icons--overlay-container"></div>
`);
overlayContainer.addEventListener('click', closeRestoreOverlay);
document.querySelector('.notion-app-inner').appendChild(overlayContainer);
const rect = document.querySelector('.notion-icons--restore-button')
.getBoundingClientRect();
const div = createElement(`
<div style="position: fixed; top: ${rect.top}px; left: ${rect.left}px; height: ${rect.height}px;">
<div style="position: relative; top: 100%; pointer-events: auto;"></div>
</div>
`);
const restoreOverlay = createElement(`
<div class="notion-icons--restore"></div>
`)
overlayContainer.appendChild(div);
div.firstElementChild.appendChild(restoreOverlay);
// Fade in
restoreOverlay.animate(
[ {opacity: 0}, {opacity: 1} ],
{ duration: 200 }
);
store().removedSets.forEach(iconData => {
const restoreItem = renderRestoreItem(iconData);
restoreOverlay.appendChild(restoreItem);
})
}
function renderRestoreItem(iconData) {
const iconUrl = `${iconData.sourceUrl}/${iconData.source}_${0}.${iconData.extension}`;
const restoreItem = createElement(`
<div class="notion-icons--removed-set">
<div style="flex-grow: 0; flex-shrink: 0; width: 32px; height: 32px;">
<img style="width: 100%; height: 100%" src="${iconUrl}" />
</div>
<span style="margin: 0 8px;">${iconData.name}</span>
</div>
`)
restoreItem.addEventListener('click', () => restoreIconSet(iconData));
return restoreItem;
}
function closeRestoreOverlay() {
const overlayContainer = document.querySelector('.notion-icons--overlay-container');
overlayContainer.removeEventListener('click', closeRestoreOverlay);
// Fade out
document.querySelector('.notion-icons--restore').animate(
[ {opacity: 1}, {opacity: 0} ],
{ duration: 200 }
).onfinish = () => overlayContainer.remove();
}
function renderIconsOverlay() {
if (!isCurrentTab(4)) {
// Switch to 3rd tab so that the link can be inputed in the underlay
if (!isCurrentTab(3)) getTab(3, true).click();
if (
store().removedSets &&
store().removedSets.length > 0
) {
addRestoreButton();
}
// Set active bar on icons tab
const iconsTab = getTab(4);
const activeBar = createElement(
`<div id="notion-icons--active-bar"></div>`
)
activeBar.style = 'border-bottom: 2px solid var(--theme--text); position: absolute; bottom: -1px; left: 8px; right: 8px;';
iconsTab.appendChild(activeBar);
getTab(4).style.position = 'relative';
getTab(3).className = 'hide-active-bar';
// Convert icons data into renderable
const iconSets = [];
if (customIconsData && customIconsData.icons) {
customIconsData.icons.forEach(i => {
iconSets.push( renderIconSet(i) );
});
// Divider
iconSets.push(
createElement(
'<div style="height: 1px; margin-bottom: 9px; border-bottom: 1px solid var(--theme--table-border);"></div>'
)
)
}
if (notionIconsData && notionIconsData.icons) {
notionIconsData.icons.forEach(i => {
i.sourceUrl = i.sourceUrl || (iconsUrl + i.source);
if ( store().removedSets ) {
for (let iconData of store().removedSets) {
if (iconData.source === i.source) return;
}
}
i.enhancerIcons = true;
iconSets.push( renderIconSet(i) );
});
}
// Create icons overlay
const notionIcons = createElement(
'<div id="notion-icons"></div>'
);
iconSets.forEach( set => notionIcons.appendChild(set) );
// Insert icons overlay
document.querySelector('.notion-media-menu > .notion-scroller')
.appendChild(notionIcons);
}
}
function renderIconSet(iconData) {
const iconSet = createElement('<div class="notion-icons--icon-set"></div>')
try {
const authorText = iconData.author
? iconData.authorUrl
? ` by <a target="_blank" href="${iconData.authorUrl}" style="opacity: 0.6;">${iconData.author}</a>`
: ` by <span style="opacity: 0.6;">${iconData.author}</span>`
: '';
const iconSetToggle = createElement(
`<div class="notion-icons--toggle">
<svg viewBox="0 0 100 100" class="triangle"><polygon points="5.9,88.2 50,11.8 94.1,88.2"></polygon></svg>
<div style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">${iconData.name}${authorText}</div>
<div class="notion-icons--extra">
<div class="notion-icons--spinner">
<img src="/images/loading-spinner.4dc19970.svg" />
</div>
</div>
</div>`
);
const iconSetBody = createElement(
'<div class="notion-icons--body"></div>'
);
iconSet.appendChild(iconSetToggle);
iconSet.appendChild(iconSetBody);
const promiseArray = [];
// Render icons
for (let i = 0; i < (iconData.count || iconData.source.length); i++) {
const iconUrl = iconData.sourceUrl
? Array.isArray(iconData.source)
? `${iconData.sourceUrl}/${iconData.source[i]}.${iconData.extension}`
: `${iconData.sourceUrl}/${iconData.source}_${i}.${iconData.extension}`
: iconData.source[i];
const icon = createElement(`<div class="notion-icons--icon"></div>`);
if (iconData.enhancerIcons) {
// Load sprite sheet
icon.innerHTML = `
<div style="width: 32px; height: 32px; background: url(${iconsUrl}${iconData.source}/sprite.png) 0 -${i * 32}px no-repeat; background-size: 32px;">
</div>
`;
} else {
icon.innerHTML = `<img src="${iconUrl}" />`;
// Make sure icons load
promiseArray.push(
new Promise((resolve, reject) => {
icon.firstChild.onload = resolve;
icon.firstChild.onerror = () => {
reject();
icon.classList.add('error');
icon.innerHTML = '!';
};
})
);
}
iconSetBody.appendChild(icon);
garbageCollector.push(icon);
icon.addEventListener('click', () => setPageIcon(iconUrl));
}
// Hide spinner after all icons finish loading
(async () => {
const spinner = iconSetToggle.querySelector('.notion-icons--spinner'),
loadPromise = Promise.all(promiseArray);
loadPromise.then(
() => spinner.remove(),
() => {
iconSet.classList.add('alert')
spinner.remove();
}
)
})();
// Add hide icon set button
if (iconData.enhancerIcons) {
const removeButton = createElement(
'<div class="notion-icons--remove-button"></div>'
);
removeButton.innerHTML = modalIcons.remove;
removeButton.addEventListener('click', e => {
e.stopPropagation();
removeIconSet(iconData)
});
iconSet.querySelector('.notion-icons--extra')
.appendChild(removeButton);
}
// Set up Toggle
requestAnimationFrame(() => {
iconSetBody.style.height = iconSetBody.style.maxHeight = `${iconSetBody.offsetHeight}px`;
if (store().removed) iconSetToggle.click();
});
iconSetToggle.addEventListener('click', e => {
if (e.target.nodeName === 'A') return;
toggleIconSet(iconSet);
});
} catch (err) {
iconSet.classList.add('error');
iconSet.innerHTML = `Invalid Icon Set: ${iconData.name}`;
}
return iconSet;
}
function toggleIconSet(iconSet) {
iconSet.classList.toggle('hidden-set');
const iconSetBody = iconSet.lastChild;
if (iconSetBody) {
iconSetBody.style.height = iconSet.classList.contains('hidden-set')
? 0
: iconSetBody.style.maxHeight;
}
}
function removeIconSet(iconData) {
if (!store().removedSets) store().removedSets = [];
for (const hiddenIconData of store().removedSets) {
if (hiddenIconData.source === iconData.source) return;
}
store().removedSets.push(iconData);
removeIcons();
renderIconsOverlay();
}
function restoreIconSet(iconData) {
if (!store().removedSets) return;
for (let i = 0; i < store().removedSets.length; i++) {
if (store().removedSets[i].source === iconData.source)
store().removedSets.splice(i, 1);
}
removeIcons();
renderIconsOverlay();
}
function removeIcons() {
const notionIcons = document.getElementById('notion-icons'),
activeBar = document.getElementById('notion-icons--active-bar'),
restoreButton = document.querySelector('.notion-icons--restore-button'),
overlayContainer = document.querySelector('.notion-icons--overlay-container');
if (notionIcons)
notionIcons.remove();
if (activeBar) {
activeBar.remove();
getTab(4).style.position = '';
}
if (getTab(3)) getTab(3).className = '';
if (restoreButton)
restoreButton.remove();
if (overlayContainer)
closeRestoreOverlay();
if (garbageCollector.length) {
for (let i = 0; i < garbageCollector.length; i++) {
garbageCollector[i] = null;
}
garbageCollector = [];
}
}
document.addEventListener('readystatechange', () => {
if (document.readyState !== 'complete') return false;
const attempt_interval = setInterval(enhance, 500);
function enhance() {
const overlay = document.querySelector('.notion-overlay-container');
if (!overlay) return;
clearInterval(attempt_interval);
const observer = new MutationObserver((list, observer) => {
for ( let { addedNodes } of list) {
if (
addedNodes[0] &&
addedNodes[0].style &&
document.querySelector('.notion-media-menu')
) {
for (let i = 0; i <= 3; i++) {
if (addedNodes[0].style.cssText === `pointer-events: auto; position: relative; z-index: ${i};`) {
addIconsTab();
return;
}
}
}
}
});
observer.observe(overlay, {
childList: true,
subtree: true,
});
}
});
},
},
};

View File

@ -1,64 +0,0 @@
/*
* outliner
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 CloudHill
* under the MIT license
*/
.outliner {
max-height: 100%;
overflow: hidden auto;
}
.outline-header {
position: relative;
display: flex;
align-items: center;
height: 2.2em;
cursor: pointer;
user-select: none;
transition: background 20ms ease-in;
}
.outline-header:hover {
background: var(--theme--interactive_hover);
}
.outline-header a {
width: 100%;
height: 100%;
padding: 0 14px;
line-height: 2.2;
color: inherit;
text-decoration: none;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.outline-header a:empty:before {
color: var(--theme--text_ui_info);
content: attr(outline-placeholder);
display: block;
}
.outline-header[header-level="2"] a {
text-indent: 18px;
}
.outline-header[header-level="3"] a {
text-indent: 36px;
}
.outliner[lined] .outline-header:not([header-level="1"])::before {
content: "";
border-left: solid 1px var(--theme--text_ui_info);
height: 2.2em;
opacity: 0.6;
position: absolute;
left: 18px;
pointer-events: none;
}
.outliner[lined] .outline-header[header-level="3"]::before {
border-right: solid 1px var(--theme--text_ui_info);
width: 18px;
}

View File

@ -1,8 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<circle cx="5" cy="7" r="2.8"/>
<circle cx="5" cy="17" r="2.79"/>
<path d="M21,5.95H11c-0.55,0-1-0.45-1-1v0c0-0.55,0.45-1,1-1h10c0.55,0,1,0.45,1,1v0C22,5.5,21.55,5.95,21,5.95z"/>
<path d="M17,10.05h-6c-0.55,0-1-0.45-1-1v0c0-0.55,0.45-1,1-1h6c0.55,0,1,0.45,1,1v0C18,9.6,17.55,10.05,17,10.05z"/>
<path d="M21,15.95H11c-0.55,0-1-0.45-1-1v0c0-0.55,0.45-1,1-1h10c0.55,0,1,0.45,1,1v0C22,15.5,21.55,15.95,21,15.95z" />
<path d="M17,20.05h-6c-0.55,0-1-0.45-1-1v0c0-0.55,0.45-1,1-1h6c0.55,0,1,0.45,1,1v0C18,19.6,17.55,20.05,17,20.05z"/>
</svg>

Before

Width:  |  Height:  |  Size: 633 B

View File

@ -1,40 +0,0 @@
/*
* outliner
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 CloudHill
* under the MIT license
*/
'use strict';
const store = require("../../pkg/store");
module.exports = {
id: '87e077cc-5402-451c-ac70-27cc4ae65546',
tags: ['extension', 'panel'],
name: 'outliner',
desc: 'table of contents.',
version: '1.0.0',
author: 'CloudHill',
options: [
{
key: 'lined',
label: 'indentation lines',
type: 'toggle',
value: true
},
{
key: 'fullHeight',
label: 'full height',
type: 'toggle',
value: false
}
],
panel: {
html: "panel.html",
name: "Outline",
icon: "icon.svg",
js: "panel.js",
fullHeight: store('87e077cc-5402-451c-ac70-27cc4ae65546').fullHeight
}
};

View File

@ -1 +0,0 @@
<div class="outliner"></div>

View File

@ -1,117 +0,0 @@
/*
* outliner
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 CloudHill
* under the MIT license
*/
'use strict';
const { createElement } = require("../../pkg/helpers");
module.exports = (store, __exports) => {
// Observe for page changes
const pageObserver = new MutationObserver((list, observer) => {
for ( let { addedNodes } of list) {
if (addedNodes[0]) {
if (addedNodes[0].className === 'notion-page-content') {
startContentObserver();
}
// Clear outline on database pages
else if (addedNodes[0].className === 'notion-scroller') {
contentObserver.disconnect();
const outline = document.querySelector('.outliner');
if (outline) outline.textContent = '';
}
}
}
});
// Observe for header changes
const contentObserver = new MutationObserver((list, observer) => {
list.forEach(m => {
if (
(
m.type === 'childList' &&
(
isHeaderElement(m.target) ||
isHeaderElement(m.addedNodes[0]) ||
isHeaderElement(m.removedNodes[0])
)
) ||
(
m.type === 'characterData' &&
isHeaderElement(m.target.parentElement)
)
) findHeaders();
})
});
function startContentObserver() {
findHeaders();
contentObserver.disconnect();
contentObserver.observe(
document.querySelector('.notion-page-content'),
{
childList: true,
subtree: true,
characterData: true,
}
);
}
function findHeaders() {
const outline = document.querySelector('.outliner');
if (!outline) return;
outline.textContent = '';
if (store().lined) outline.setAttribute('lined', '');
const pageContent = document.querySelector('.notion-page-content');
const headerBlocks = pageContent.querySelectorAll('[class*="header-block"]');
headerBlocks.forEach(block => {
const blockId = block.dataset.blockId.replace(/-/g, '');
const placeholder = block.querySelector('[placeholder]').getAttribute('placeholder');
const header = createElement(`
<div class="outline-header" header-level="${placeholder.slice(-1)}">
<a href="${window.location.pathname}#${blockId}"
outline-placeholder="${placeholder}">${block.innerText}</a>
</div>
`);
outline.append(header);
})
}
function isHeaderElement(el) {
let placeholder;
if (el) {
if (
el.querySelector &&
el.querySelector('[placeholder]')
) {
placeholder = el.querySelector('[placeholder]').getAttribute('placeholder')
} else if (el.getAttribute) {
placeholder = el.getAttribute('placeholder');
}
}
if (!placeholder) placeholder = '';
return placeholder.includes('Heading');
}
return {
onLoad() {
// Find headers when switching panels
if (document.querySelector('.notion-page-content')) {
startContentObserver();
};
pageObserver.observe(document.body, {
childList: true,
subtree: true,
});
},
onSwitch() {
pageObserver.disconnect();
contentObserver.disconnect();
}
}
}

View File

@ -1,12 +0,0 @@
/*
* panel sites
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 CloudHill
* under the MIT license
*/
.panel-site {
border: none;
flex: 1;
background: white;
}

View File

@ -1,28 +0,0 @@
/*
* panel sites
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 CloudHill
* under the MIT license
*/
'use strict';
module.exports = {
id: '0d541743-eb2c-4d77-83a8-3b2f5e8e5dff',
tags: ['extension', 'panel'],
name: 'panel sites',
desc: 'embed sites on the site panel.',
version: '1.0.0',
author: 'CloudHill',
options: [
{
key: 'sites',
label: 'list of sites',
type: 'file',
extensions: ['json'],
},
],
panel: {
js: 'panel.js'
}
};

View File

@ -1,45 +0,0 @@
/*
* panel sites
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 CloudHill
* under the MIT license
*/
const electron = require('electron')
module.exports = (store) => {
let iframe;
const mainWindow = electron.remote.getCurrentWindow();
const originalUserAgent = mainWindow.webContents.getUserAgent();
const mobileUserAgent =
'Mozilla/5.0 (Linux; Android 7.0; SM-G930V Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.125 Mobile Safari/537.36'
// bypass x-frame-options
mainWindow.webContents.session.webRequest.onHeadersReceived((details, callback) => {
const responseHeaders = Object.entries(details.responseHeaders)
.filter( h => !/x-frame-options/i.test(h[0]) );
callback({
responseHeaders: Object.fromEntries(responseHeaders)
});
});
// handle opening mobile sites
function setUserAgent(userAgent) {
mainWindow.webContents.session.webRequest.onBeforeSendHeaders((details, callback) => {
details.requestHeaders['User-Agent'] = userAgent;
callback({ cancel: false, requestHeaders: details.requestHeaders });
});
}
return {
onLoad() {
iframe = document.querySelector('.panel-site');
if (iframe.hasAttribute('mobile-user-agent'))
setUserAgent(mobileUserAgent);
},
onSwitch() {
if (iframe.hasAttribute('mobile-user-agent'))
setUserAgent(originalUserAgent);
}
}
}

View File

@ -1,21 +0,0 @@
/*
* pastel dark
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 u/zenith_illinois
* under the MIT license
*/
'use strict';
module.exports = {
id: '033bff54-50ba-4cec-bdc0-b2ca7e307085',
tags: ['theme', 'dark'],
name: 'pastel dark',
desc: 'a smooth-transition true dark theme with a hint of pastel.',
version: '0.1.4',
author: {
name: 'zenith_illinois',
link: 'https://www.reddit.com/user/zenith_illinois/',
avatar: 'https://www.redditstatic.com/avatars/avatar_default_18_46A508.png',
},
};

View File

@ -1,119 +0,0 @@
/*
* pastel dark
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 u/zenith_illinois
* under the MIT license
*/
@import 'https://rsms.me/inter/inter.css';
:root {
--theme_dark--main: #0b0b0b;
--theme_dark--sidebar: #0f0f0f;
--theme_dark--overlay: rgba(15, 15, 15, 0.6);
--theme_dark--dragarea: #0d0d0d;
--theme_dark--font_sans: 'Inter', -apple-system, BlinkMacSystemFont,
'Segoe UI', Helvetica, 'Apple Color Emoji', Arial, sans-serif,
'Segoe UI Emoji', 'Segoe UI Symbol';
--theme_dark--scrollbar: #141414;
--theme_dark--scrollbar_hover: #1b1b1b;
--theme_dark--card: #0f0f0f;
--theme_dark--gallery: rgba(8, 8, 8, 0.05);
--theme_dark--select_input: #0d0d0d;
--theme_dark--table-border: rgba(255, 255, 255, 0.1);
--theme_dark--ui-border: var(--theme_dark--table-border);
--theme_dark--interactive_hover: #1e1e1e5c;
--theme_dark--button_close: #eb5757;
--theme_dark--selected: rgba(184, 135, 247, 0.3);
--theme_dark--primary: #b887f7;
--theme_dark--primary_hover: #08d7c2;
--theme_dark--primary_click: #b887f7;
--theme_dark--primary_indicator: #08d7c2;
--theme_dark--option_active-background: var(--theme_dark--primary);
--theme_dark--option_hover-background: var(--theme_dark--primary_hover);
--theme_dark--danger_text: #eb5757;
--theme_dark--danger_border: rgba(235, 87, 87, 0.5);
--theme_dark--text: #ffffff;
--theme_dark--text_ui: #909090;
--theme_dark--text_ui_info: #464646;
--theme_dark--text_gray: #b1aeab;
--theme_dark--text_brown: #d8b6a6;
--theme_dark--text_orange: #fde3c0;
--theme_dark--text_yellow: #fcde93;
--theme_dark--text_green: #b3f5c8;
--theme_dark--text_blue: #bfe0fd;
--theme_dark--text_purple: #dac7fa;
--theme_dark--text_pink: #f7b8dc;
--theme_dark--text_red: #f8acb4;
--theme_dark--bg-text: rgb(55, 53, 47);
--theme_dark--bg_gray: #b1aeab;
--theme_dark--bg_brown: #d8b6a6;
--theme_dark--bg_orange: #fde3c0;
--theme_dark--bg_yellow: #fcde93;
--theme_dark--bg_green: #b3f5c8;
--theme_dark--bg_blue: #bfe0fd;
--theme_dark--bg_purple: #dac7fa;
--theme_dark--bg_pink: #f7b8dc;
--theme_dark--bg_red: #f8acb4;
--theme_dark--line-text: rgb(34, 34, 34);
--theme_dark--line_gray: #c2c1c089;
--theme_dark--line_brown: #dacec992;
--theme_dark--line_orange: #fff0dc9f;
--theme_dark--line_yellow: #ffe6a6ad;
--theme_dark--line_green: #c8fdd9a3;
--theme_dark--line_blue: #d1e9ffa3;
--theme_dark--line_purple: #e3d3ffa8;
--theme_dark--line_pink: #fdcce8b1;
--theme_dark--line_red: #ffc8ce9e;
--theme_dark--select-text: var(--theme_dark--bg-text);
--theme_dark--select_gray: var(--theme_dark--bg_gray);
--theme_dark--select_brown: var(--theme_dark--bg_brown);
--theme_dark--select_orange: var(--theme_dark--bg_orange);
--theme_dark--select_yellow: var(--theme_dark--bg_yellow);
--theme_dark--select_green: var(--theme_dark--bg_green);
--theme_dark--select_blue: var(--theme_dark--bg_blue);
--theme_dark--select_purple: var(--theme_dark--bg_purple);
--theme_dark--select_pink: var(--theme_dark--bg_pink);
--theme_dark--select_red: var(--theme_dark--bg_red);
--theme_dark--callout-text: var(--theme_dark--line-text);
--theme_dark--callout_gray: var(--theme_dark--line_gray);
--theme_dark--callout_brown: var(--theme_dark--line_brown);
--theme_dark--callout_orange: var(--theme_dark--line_orange);
--theme_dark--callout_yellow: var(--theme_dark--line_yellow);
--theme_dark--callout_green: var(--theme_dark--line_green);
--theme_dark--callout_blue: var(--theme_dark--line_blue);
--theme_dark--callout_purple: var(--theme_dark--line_purple);
--theme_dark--callout_pink: var(--theme_dark--line_pink);
--theme_dark--callout_red: var(--theme_dark--line_red);
--theme_dark--code_inline-text: #b3f5c8;
--theme_dark--code_inline-background: rgb(8, 8, 8);
--theme_dark--code-text: var(--theme_dark--text);
--theme_dark--code-background: #0f0f0f;
--theme_dark--code_function: var(--theme_dark--text_blue);
--theme_dark--code_keyword: var(--theme_dark--text_pink);
--theme_dark--code_tag: var(--theme_dark--text_pink);
--theme_dark--code_operator: var(--theme_dark--text_yellow);
--theme_dark--code_important: var(--theme_dark--text_yellow);
--theme_dark--code_property: var(--theme_dark--text_pink);
--theme_dark--code_builtin: var(--theme_dark--text_yellow);
--theme_dark--code_attr-name: var(--theme_dark--text_yellow);
--theme_dark--code_comment: var(--theme_dark--text_gray);
--theme_dark--code_punctuation: var(--theme_dark--text_gray);
--theme_dark--code_doctype: var(--theme_dark--text_gray);
--theme_dark--code_number: var(--theme_dark--text_purple);
--theme_dark--code_string: var(--theme_dark--text_orange);
--theme_dark--code_attr-value: var(--theme_dark--text_orange);
}

View File

@ -1,48 +0,0 @@
/*
* property layout
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 alexander-kazakov
* under the MIT license
*/
.propertylayout-enhanced {
overflow: hidden;
transition: max-height 200ms ease-in, opacity 200ms ease-in;
}
.propertylayout-hidden {
max-height: 0 !important;
opacity: 0;
}
.propertylayout-toggle {
width: 100%;
text-align: left;
font-size: 0.85em;
font-weight: 600;
padding: 0.25em;
background: transparent;
color: var(--theme--text_ui);
border: none;
border-radius: 2px;
transition: background 200ms, margin-bottom 200ms ease-in;
}
.notion-scroller.vertical > div > :first-child .propertylayout-toggle {
margin-top: 1em;
}
.propertylayout-toggle[data-action='show'] {
margin-bottom: 1em;
}
.propertylayout-toggle:hover {
background: var(--theme--interactive_hover);
}
.propertylayout-toggle .triangle {
width: 0.6875em;
height: 0.6875em;
margin: 0 0.75em 0 0.5em;
transition: transform 200ms ease-out 0s;
transform: rotateZ(90deg);
}
.propertylayout-toggle[data-action="hide"] .triangle {
transform: rotateZ(180deg);
}

View File

@ -1,78 +0,0 @@
/*
* property layout
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 alexander-kazakov
* under the MIT license
*/
'use strict';
const { createElement } = require('../../pkg/helpers.js');
module.exports = {
id: '4034a578-7dd3-4633-80c6-f47ac5b7b160',
tags: ['extension'],
name: 'property layout',
desc: 'auto-collapse page properties that usually push down page content.',
version: '0.2.4',
author: 'alexander-kazakov',
hacks: {
'renderer/preload.js'(store, __exports) {
document.addEventListener('readystatechange', (event) => {
if (document.readyState !== 'complete') return false;
let queue = [];
const observer = new MutationObserver((list, observer) => {
if (!queue.length) requestAnimationFrame(() => handle(queue));
queue.push(...list);
});
observer.observe(document.body, {
childList: true,
subtree: true,
});
function handle(list) {
queue = [];
let properties = document.querySelector(
'.notion-scroller.vertical [style*="env(safe-area-inset-left)"] > [style="width: 100%; font-size: 14px;"]'
);
if (
properties &&
!properties.classList.contains('propertylayout-enhanced')
) {
properties.classList.add(
'propertylayout-enhanced',
'propertylayout-hidden'
);
const toggle = createElement(
'<button class="propertylayout-toggle" data-action="show">Properties</button>'
);
toggle.prepend(
createElement('<svg viewBox="0 0 100 100" class="triangle"><polygon points="5.9,88.2 50,11.8 94.1,88.2 "></polygon></svg>')
);
toggle.addEventListener('click', (event) => {
properties.style.maxHeight = properties.children[0].offsetHeight + 'px';
setTimeout(() => {
properties.classList.toggle('propertylayout-hidden');
toggle.setAttribute(
'data-action',
properties.classList.contains('propertylayout-hidden')
? 'show'
: 'hide'
);
}, 0);
});
const propObserver = new MutationObserver(() => {
properties.style.maxHeight = '';
});
propObserver.observe(properties, {
childList: true,
subtree: true,
});
if (properties.previousElementSibling) {
properties.previousElementSibling.append(toggle);
} else properties.parentElement.prepend(toggle);
}
}
});
},
},
};

View File

@ -1,67 +0,0 @@
/*
* right-to-left
* (c) 2020 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
* (c) 2020 Omar Bahareth
* under the MIT license
*/
'use strict';
module.exports = {
id: 'b28ee2b9-4d34-4e36-be8a-ab5be3d79f51',
tags: ['extension'],
name: 'right-to-left',
desc: 'enables auto rtl/ltr text direction detection.',
version: '1.4.1',
author: 'obahareth',
hacks: {
'renderer/preload.js'(store, __exports) {
document.addEventListener('readystatechange', (event) => {
if (document.readyState !== 'complete') return false;
let queue = [];
const DOCUMENT_OBSERVER = new MutationObserver((list, observer) => {
if (!queue.length) requestIdleCallback(() => handle(queue));
queue.push(...list);
}),
PAGE_OBSERVER = new MutationObserver(autoAlignPageContent);
DOCUMENT_OBSERVER.observe(document.body, {
childList: true,
subtree: true,
});
function handle(list) {
queue = [];
for (let { addedNodes } of list) {
if (
addedNodes[0] &&
addedNodes[0].className === 'notion-page-content'
) {
autoAlignPageContent();
PAGE_OBSERVER.disconnect();
PAGE_OBSERVER.observe(addedNodes[0], {
childList: true,
subtree: false,
});
}
}
}
function autoAlignPageContent() {
document
.querySelectorAll(
`.notion-page-content > div[data-block-id]:not([dir]):not(.notion-column_list-block),
[placeholder="Untitled"]:not([dir]),
.notion-column-block > div[data-block-id]:not([dir])`
)
.forEach((block) => block.setAttribute('dir', 'auto'));
document
.querySelectorAll(
"div[placeholder='List'], div[placeholder='To-do']"
)
.forEach((item) => {
item.style['text-align'] = '-webkit-auto';
});
}
});
},
},
};

Some files were not shown because too many files have changed in this diff Show More