mirror of
https://github.com/notion-enhancer/notion-enhancer.git
synced 2025-04-09 15:09:02 +00:00
apply on onboarding page
This commit is contained in:
parent
9e0b089e07
commit
3a781bb94c
@ -9,10 +9,10 @@
|
|||||||
(async () => {
|
(async () => {
|
||||||
const site = location.host.endsWith('.notion.site'),
|
const site = location.host.endsWith('.notion.site'),
|
||||||
page = location.pathname.split(/[/-]/g).reverse()[0].length === 32,
|
page = location.pathname.split(/[/-]/g).reverse()[0].length === 32,
|
||||||
root = location.pathname === '/',
|
whitelisted = ['/', '/onboarding'].includes(location.pathname),
|
||||||
signedIn = localStorage['LRU:KeyValueStore2:current-user-id'];
|
signedIn = localStorage['LRU:KeyValueStore2:current-user-id'];
|
||||||
|
|
||||||
if (site || page || (root && signedIn)) {
|
if (site || page || (whitelisted && signedIn)) {
|
||||||
import(chrome.runtime.getURL('api/_.mjs')).then(async (api) => {
|
import(chrome.runtime.getURL('api/_.mjs')).then(async (api) => {
|
||||||
const { fs, registry, web } = api;
|
const { fs, registry, web } = api;
|
||||||
for (const mod of await registry.list((mod) => registry.enabled(mod.id))) {
|
for (const mod of await registry.list((mod) => registry.enabled(mod.id))) {
|
||||||
|
Loading…
Reference in New Issue
Block a user