diff --git a/webext/src/App.svelte b/webext/src/App.svelte index 5f86166..2f68544 100644 --- a/webext/src/App.svelte +++ b/webext/src/App.svelte @@ -7,6 +7,8 @@ const api = new UpEndApi("http://localhost:8093"); + let visitngUpEnd = false; + let opening = false; let openError: string | undefined; @@ -44,6 +46,14 @@ let currentUrl: string | undefined; let contentType: string | undefined; onMount(async () => { + browser.tabs + .executeScript(undefined, { + code: `document.querySelector('meta[name="application-name"]')?.content`, + }) + .then((result) => { + visitngUpEnd = (result[0] as string | undefined) === "UpEnd"; + }); + currentUrl = await getCurrentUrl(); browser.tabs.onUpdated.addListener(async () => { @@ -211,86 +221,90 @@
-
- -
Content type: {contentType || "???"}
-
-
-
+ {#if !visitngUpEnd} +
-
- {#if urlAdded} - Added at {urlAdded.toLocaleString()} - {:else} - --- - {/if} +
Content type: {contentType || "???"}
+
+
+
+ +
+ {#if urlAdded} + Added at {urlAdded.toLocaleString()} + {:else} + --- + {/if} +
+
+
+ +
+ {#if contentAdded} + Added at {contentAdded.toLocaleString()} + {:else} + --- + {/if} +
-
- -
- {#if contentAdded} - Added at {contentAdded.toLocaleString()} - {:else} - --- - {/if} -
-
-
- {#if opening && !openError} -
Working, please wait...
- {/if} - {#if openError} -
{openError}
- {/if} -
-
- - -
-
- Status: {#if !instanceVersionError} - {`OK, v.${instanceVersion}` || "???"} - {:else} -
{instanceVersionError}
+ {#if opening && !openError} +
Working, please wait...
{/if} -
+ {#if openError} +
{openError}
+ {/if} +
+
+ + +
+
+ Status: {#if !instanceVersionError} + {`OK, v.${instanceVersion}` || "???"} + {:else} +
{instanceVersionError}
+ {/if} +
+ {:else} +
You rock :)
+ {/if}