diff --git a/src/entrypoints/content/content.ts b/src/entrypoints/content/content.ts index 0a36be1d..70415302 100644 --- a/src/entrypoints/content/content.ts +++ b/src/entrypoints/content/content.ts @@ -1,6 +1,8 @@ // โš  DO NOT IMPORT ANYTHING EXCEPT TYPES HERE DUE THE `import()` ERRORS โš  import type { ContentScriptPayload } from '~/shared/types' +console.log(`%c๐Ÿ•Š RUA: Content script is running`, 'font-weight:bold') + /** Injects and executes the script with the payload. The ID of the script tag is the same as the filename. */ const injectAndExecuteScript = (payload: ContentScriptPayload): void => { const script = document.createElement('script') diff --git a/src/entrypoints/content/inject.ts b/src/entrypoints/content/inject.ts index 2833310d..e52232dc 100644 --- a/src/entrypoints/content/inject.ts +++ b/src/entrypoints/content/inject.ts @@ -1,6 +1,8 @@ // โš  DO NOT IMPORT ANYTHING EXCEPT TYPES HERE DUE THE `import()` ERRORS โš  import type { ContentScriptPayload } from '~/shared/types' +console.log(`%c๐Ÿ‘ป RUA: Injected script is running`, 'font-weight:bold') + /** Extracts the payload from the script tag. */ const extractPayload = async ( timeout: number = 2000, @@ -8,6 +10,8 @@ const extractPayload = async ( ): Promise => { const startedAt = Date.now() + console.log(document.getElementById(__UNIQUE_INJECT_FILENAME__)) + return new Promise((resolve: (_: Awaited>) => void): void => { const t = setInterval(() => { // if the timeout is reached, resolve with `undefined` diff --git a/website/sandbox/index.html b/website/sandbox/index.html index f0acbde1..87252a01 100644 --- a/website/sandbox/index.html +++ b/website/sandbox/index.html @@ -3,42 +3,142 @@ @@ -169,8 +269,10 @@ below.

- If you see more than one item in the list, it indicates that the user-agent data has changed during the page load. - Sometimes, you may need to refresh the page more than once to see the changes. + If you see more than one item in the list, it indicates that the user-agent data has changed during the page + load. Sometimes, you may need to refresh the page multiple times to see the changes. If you see + only one item, it means that the user-agent data has not changed once the page is loaded + (ensure it's spoofed if the extension is enabled).

Items marked with ๐Ÿ—‘๏ธ are deprecated, ๐Ÿงช denotes experimental features, and (!๐ŸฆŠ !๐Ÿงญ) indicates features @@ -186,7 +288,7 @@