mirror of
https://github.com/tubearchivist/browser-extension.git
synced 2024-11-05 03:30:12 +00:00
click logo to open instance, #2
This commit is contained in:
parent
91e7345512
commit
62e7469e3d
@ -11,7 +11,9 @@
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="logo">
|
||||
<img src="/images/logo.png" alt="ta-logo">
|
||||
<a href="#" id="ta-url" target="_blank">
|
||||
<img src="/images/logo.png" alt="ta-logo">
|
||||
</a>
|
||||
<span>v0.0.1</span>
|
||||
</div>
|
||||
<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
|
||||
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user