Skip to content

Commit

Permalink
stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Sv443 committed Oct 17, 2023
1 parent 31cf8d3 commit 9275eee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
10 changes: 6 additions & 4 deletions src/selectorObserver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
7 changes: 4 additions & 3 deletions src/tools/post-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand Down Expand Up @@ -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");

Expand Down

0 comments on commit 9275eee

Please sign in to comment.