webplugin settings defaults
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
// Copyright © 2026 Olaf Kolkman
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
const DEFAULT_BACKEND = 'https://linklog.example.com';
|
||||
|
||||
const statusEl = document.getElementById('status');
|
||||
const form = document.getElementById('settings-form');
|
||||
const backendUrlInput = document.getElementById('backend-url');
|
||||
@@ -24,7 +22,7 @@ function setStatus(message, isError = false) {
|
||||
|
||||
async function loadSettings() {
|
||||
const settings = await browser.storage.local.get(['backendUrl', 'username', 'accessToken']);
|
||||
backendUrlInput.value = settings.backendUrl || DEFAULT_BACKEND;
|
||||
backendUrlInput.value = settings.backendUrl || '';
|
||||
usernameInput.value = settings.username || '';
|
||||
|
||||
if (settings.accessToken && settings.backendUrl) {
|
||||
|
||||
Reference in New Issue
Block a user