diff --git a/extension/icons/monstr/party.svg b/extension/icons/monstr/party.svg new file mode 100644 index 0000000..ff65557 --- /dev/null +++ b/extension/icons/monstr/party.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/extension/repo/CHANGELOG.md b/extension/repo/CHANGELOG.md index 733c86a..f67ac04 100644 --- a/extension/repo/CHANGELOG.md +++ b/extension/repo/CHANGELOG.md @@ -5,12 +5,13 @@ - improved: split the core mod into the theming & menu mods. - improved: new larger menu layout, with individual mod pages. - improved: merged bracketed-links into tweaks. +- improved: replaced confusing all-tag filters with themes/extensions/enabled/disabled filters. - removed: integrated scrollbar tweak (notion now includes by default). - removed: js insert. css insert moved to tweaks mod. +- ported: tweaks, bypass-preview. #### todo -- tag sort - documentation e.g. \_file - complete/bugfix theming variables - color pickers diff --git a/extension/repo/bypass-preview@cb6fd684-f113-4a7a-9423-8f0f0cff069f/client.js b/extension/repo/bypass-preview@cb6fd684-f113-4a7a-9423-8f0f0cff069f/client.js index 68955c2..e4e9f3f 100644 --- a/extension/repo/bypass-preview@cb6fd684-f113-4a7a-9423-8f0f0cff069f/client.js +++ b/extension/repo/bypass-preview@cb6fd684-f113-4a7a-9423-8f0f0cff069f/client.js @@ -4,6 +4,8 @@ * (https://notion-enhancer.github.io/) under the MIT license */ +'use strict'; + import { web } from '../../api.js'; web.whenReady().then(async () => { @@ -23,7 +25,7 @@ function getCurrentPage() { return { type: 'page', id: location.pathname.split(/(-|\/)/g).reverse()[0] }; } let lastPage = getCurrentPage(); -web.observeDocument((event) => { +web.addDocumentObserver((event) => { const currentPage = getCurrentPage(); if (currentPage.id !== lastPage.id || currentPage.type !== lastPage.type) { const openAsPage = document.querySelector( diff --git a/extension/repo/bypass-preview@cb6fd684-f113-4a7a-9423-8f0f0cff069f/mod.json b/extension/repo/bypass-preview@cb6fd684-f113-4a7a-9423-8f0f0cff069f/mod.json index b51c1fd..f77d96b 100644 --- a/extension/repo/bypass-preview@cb6fd684-f113-4a7a-9423-8f0f0cff069f/mod.json +++ b/extension/repo/bypass-preview@cb6fd684-f113-4a7a-9423-8f0f0cff069f/mod.json @@ -1,7 +1,7 @@ { "name": "bypass-preview", "id": "cb6fd684-f113-4a7a-9423-8f0f0cff069f", - "description": "go straight to the normal full view when opening a page..", + "description": "go straight to the normal full view when opening a page.", "version": "0.2.0", "tags": ["extension", "automation"], "authors": [ diff --git a/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/README.md b/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/README.md index 8679d5a..c9b8a11 100644 --- a/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/README.md +++ b/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/README.md @@ -1 +1,3 @@ # menu + +[theming mod link test](?view=mod&id=0f0bf8b6-eae6-4273-b307-8fc43f2ee082) diff --git a/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/client.js b/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/client.js index 28de427..df9b13d 100644 --- a/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/client.js +++ b/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/client.js @@ -25,6 +25,7 @@ web.whenReady([sidebarSelector]).then(async () => { list: await fs.getJSON('https://notion-enhancer.github.io/notifications.json'), dismissed: await storage.get(_id, 'notifications', []), }; + console.log($enhancerSidebarElement); notifications.waiting = notifications.list.filter( ({ id }) => !notifications.dismissed.includes(id) ); @@ -48,4 +49,4 @@ web.whenReady([sidebarSelector]).then(async () => { setTheme(); document.querySelector(sidebarSelector).appendChild($enhancerSidebarElement); }); -web.hotkeyListener(await storage.get(_id, 'hotkey.focustoggle'), env.openEnhancerMenu); +web.addHotkeyListener(await storage.get(_id, 'hotkey.focustoggle'), env.openEnhancerMenu); diff --git a/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/menu.css b/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/menu.css index 0fea1fc..65f60c3 100644 --- a/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/menu.css +++ b/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/menu.css @@ -11,6 +11,7 @@ -webkit-text-size-adjust: 100%; font-size: inherit; font-family: inherit; + fill: currentColor; } html { @@ -43,7 +44,7 @@ header > * { margin: 0 1.25rem 0.1em 0; font-size: var(--theme--font_heading1-size); } -header h1 a:not([data-view-active]) { +header h1 a { text-decoration: none; } header h1 img { @@ -80,7 +81,7 @@ main { main { grid-template-columns: 1fr 1fr; } - [data-view='mod'] main > .documentation--buttons { + main > .action--buttons { grid-column: span 2; } [data-view='mod'] main .library--card, @@ -97,7 +98,7 @@ main { main { grid-template-columns: 1fr 1fr 1fr; } - [data-view='mod'] main > .documentation--buttons { + main > .action--buttons { grid-column: span 3; } [data-view='mod'] main > .documentation--body { @@ -108,7 +109,7 @@ main { main { grid-template-columns: 1fr 1fr 1fr 1fr; } - [data-view='mod'] main > .documentation--buttons { + main > .action--buttons { grid-column: span 4; } [data-view='mod'] main > .documentation--body { @@ -119,7 +120,7 @@ main { main { grid-template-columns: 1fr 1fr 1fr 1fr 1fr; } - [data-view='mod'] main > .documentation--buttons { + main > .action--buttons { grid-column: span 5; } [data-view='mod'] main > .documentation--body { @@ -136,7 +137,7 @@ main article img { max-width: 100%; } -.documentation--buttons, +.action--buttons, .library--expand { margin: 0; display: flex; @@ -146,14 +147,14 @@ main article img { .library--expand a { margin-left: auto; } -.documentation--buttons a, +.action--buttons a, .library--expand a { border-radius: 3px; padding: 0.35rem 0.45rem; text-decoration: none; display: flex; } -.documentation--buttons .documentation--reload { +.action--buttons .action--alert { cursor: pointer; border-radius: 3px; padding: 0.35rem 0.45rem; @@ -164,31 +165,32 @@ main article img { opacity: 0; transition: opacity 200ms ease-in-out; } -.documentation--buttons .documentation--reload[data-triggered] { +.action--buttons .action--alert[data-triggered] { pointer-events: all; opacity: 1; } -.documentation--buttons .documentation--reload[data-triggered]:hover { +.action--buttons .action--alert[data-triggered]:hover { background: none; color: var(--theme--block_grey-text); box-shadow: var(--theme--block_grey) 0px 0px 0px 1px inset; } -.documentation--buttons span, +.action--buttons span, .library--expand span { color: var(--theme--text_property); } -.documentation--buttons a:hover, +.action--buttons a:hover, +.action--buttons a.action--active, .library--expand a:hover { background: var(--theme--button-hover); } -.documentation--buttons svg, +.action--buttons svg, .library--expand svg { width: 1em; height: 1em; padding-top: 2px; margin-right: 0.3rem; } -.documentation--buttons svg *, +.action--buttons svg *, .library--expand svg * { fill: var(--theme--text_property); } @@ -269,7 +271,7 @@ label p > span:not([class]), label > span:not([class]) { font-size: 1rem; } -label [data-icon='fa/question-circle'] { +label [data-icon='fa/solid/question-circle'] { height: var(--theme--font_ui_small-size); width: var(--theme--font_ui_small-size); margin-left: 0.25em; @@ -306,7 +308,7 @@ label [data-icon='fa/question-circle'] { height: 0.8rem; width: 0.8rem; left: 0.325rem; - top: 0.225rem; + top: 0.2rem; position: absolute; border-radius: 100%; background: var(--theme--toggle_dot); @@ -419,22 +421,7 @@ label [data-icon='fa/question-circle'] { overflow-x: auto; } -.tooltip { - position: absolute; - background: var(--theme--tooltip); - color: var(--theme--tooltip-text); - font-size: var(--theme--font_ui_small-size); - padding: 0.15rem 0.4rem; - box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important; - border-radius: 3px; - max-width: 20rem; - display: none; -} -.tooltip p { - margin: 0.25rem 0; -} - -.notification--list { +.notifications { position: absolute; bottom: 1.5rem; right: 1.5rem; @@ -459,7 +446,7 @@ label [data-icon='fa/question-circle'] { transform-origin: 100% 100%; opacity: 0; } -.notification svg { +.notification :not(.notification--dismiss) > svg { height: 1.5rem; width: 1.5rem; margin-top: 0.25rem; @@ -478,27 +465,20 @@ label [data-icon='fa/question-circle'] { right: 0.75rem; background: none; border: none; - padding: 0.25rem 0.35rem; - font-size: var(--theme--font_body-size); + padding: 0.15rem 0 0.15rem 0.5rem; + width: var(--theme--font_body-size); color: currentColor; cursor: pointer; transition: opacity 200ms ease-in-out; opacity: 0; } +.notification .notification--dismiss svg { + width: 100%; +} .notification:hover .notification--dismiss, .notification:focus-within .notification--dismiss { opacity: 1; } -.notification.celebration, -.notification.information { - background: var(--theme--block_blue); - color: var(--theme--block_blue-text); -} -.notification.warning, -.notification.danger { - background: var(--theme--block_red); - color: var(--theme--block_red-text); -} ::-webkit-scrollbar { background: transparent; diff --git a/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/menu.html b/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/menu.html index 9d659f7..4ee54bf 100644 --- a/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/menu.html +++ b/extension/repo/menu@a6621988-551d-495a-97d8-3c568bca2e9e/menu.html @@ -8,21 +8,23 @@