mirror of
https://github.com/tubearchivist/browser-extension.git
synced 2024-11-22 19:50:12 +00:00
click logo to open instance, #2
This commit is contained in:
parent
91e7345512
commit
62e7469e3d
@ -11,7 +11,9 @@
|
|||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
|
<a href="#" id="ta-url" target="_blank">
|
||||||
<img src="/images/logo.png" alt="ta-logo">
|
<img src="/images/logo.png" alt="ta-logo">
|
||||||
|
</a>
|
||||||
<span>v0.0.1</span>
|
<span>v0.0.1</span>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
@ -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
|
// change status icon based on connection status
|
||||||
function setStatusIcon(connected) {
|
function setStatusIcon(connected) {
|
||||||
@ -153,6 +159,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|||||||
document.getElementById("port").value = item.access.port;
|
document.getElementById("port").value = item.access.port;
|
||||||
document.getElementById("api-key").value = item.access.apiKey;
|
document.getElementById("api-key").value = item.access.apiKey;
|
||||||
pingBackend();
|
pingBackend();
|
||||||
|
addUrl(item.access);
|
||||||
};
|
};
|
||||||
|
|
||||||
function onError(error) {
|
function onError(error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user