From 62e7469e3d8f896cca38b7b2079f626f28044943 Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 30 May 2022 18:32:12 +0700 Subject: [PATCH] click logo to open instance, #2 --- extension/index.html | 4 +++- extension/popup.js | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/extension/index.html b/extension/index.html index cbf8c85..db20576 100644 --- a/extension/index.html +++ b/extension/index.html @@ -11,7 +11,9 @@

diff --git a/extension/popup.js b/extension/popup.js index 16d7eb4..6129efb 100644 --- a/extension/popup.js +++ b/extension/popup.js @@ -62,6 +62,12 @@ function pingBackend() { } +// add url to image +function addUrl(access) { + const url = `${access.url}:${access.port}`; + document.getElementById("ta-url").setAttribute("href", url); +} + // change status icon based on connection status function setStatusIcon(connected) { @@ -153,6 +159,7 @@ document.addEventListener("DOMContentLoaded", async () => { document.getElementById("port").value = item.access.port; document.getElementById("api-key").value = item.access.apiKey; pingBackend(); + addUrl(item.access); }; function onError(error) {