From 9275eeeb8e28a469a0e4796a7d0d9441c865f80f Mon Sep 17 00:00:00 2001 From: Sven Date: Tue, 17 Oct 2023 17:33:33 +0200 Subject: [PATCH] stuff --- src/selectorObserver.ts | 10 ++++++---- src/tools/post-build.ts | 7 ++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/selectorObserver.ts b/src/selectorObserver.ts index b1f4d3d..1fe3860 100644 --- a/src/selectorObserver.ts +++ b/src/selectorObserver.ts @@ -5,25 +5,27 @@ export async function selectorObserverTest() { bodyObs.addListener("#selector-observer-cont", { listener: (cont1) => { - console.log("container 1 available"); + console.log("bodyObs: available"); const subcont1Obs = new SelectorObserver(cont1); subcont1Obs.addListener("#selector-observer-subcont1", { listener: (subcont1) => { - console.log("subcontainer 1 available"); + console.log("subcont1Obs: available"); const subcont1ItemsObs = new SelectorObserver(subcont1); - subcont1ItemsObs.addListener(".selector-observer-subcont", { + subcont1ItemsObs.addListener(".selector-observer-item", { all: true, continuous: true, listener: (subcont1Items) => { - console.log("subcontainer 1 items:", subcont1Items); + console.log("subcont1Obs: items:", subcont1Items); }, }); }, }); + console.log("subcont1Obs: listeners:", subcont1Obs.getAllListeners()); }, }); + console.log("bodyObs: listeners:", bodyObs.getAllListeners()); } diff --git a/src/tools/post-build.ts b/src/tools/post-build.ts index d39ec59..c98d1d2 100644 --- a/src/tools/post-build.ts +++ b/src/tools/post-build.ts @@ -12,6 +12,7 @@ dotenv.config(); const envPort = Number(env.DEV_SERVER_PORT); const devServerPort = isNaN(envPort) || envPort === 0 ? 8710 : envPort; +const testSitePort = 12121; /** * Namespace (user or organization) and repository name, separated by a slash. @@ -27,8 +28,8 @@ const branch = "main"; * See https://wiki.greasespot.net/Metadata_Block#%40match */ const matchUrls = [ - `http://localhost:${envPort}/*`, - `http://127.0.0.1:${envPort}/*`, + `http://localhost:${testSitePort}/*`, + `http://127.0.0.1:${testSitePort}/*`, ]; /** * URL to the icon of the userscript. @@ -120,7 +121,7 @@ ${requireDirectives}\ console.info(`\nSuccessfully built for ${modeText}\x1b[0m`); lastCommitSha && console.info(`Build number (last commit SHA): \x1b[34m${lastCommitSha}\x1b[0m`); console.info(`Outputted file '${encodeURI(relative("./", scriptPath))}' with a size of \x1b[32m${sizeKiB} KiB\x1b[0m`); - console.info(`Userscript URL: \x1b[34m\x1b[4mhttp://localhost:${devServerPort}/${encodeURI(userscriptDistFile)}\x1b[0m\x1b[0m\n`); + console.info(`Userscript URL: \x1b[34m\x1b[4mhttp://localhost:${devServerPort}/${encodeURI(userscriptDistFile)}\x1b[0m\n`); ringBell && process.stdout.write("\u0007");