Changed how the artwork gets sent to the API, this is done by sending it separately, so now we have 2 endpoints, its not the best but, it works for now :)

This commit is contained in:
2025-06-21 22:53:47 -07:00
parent 45a942b63e
commit 4ccf5edd2e
4 changed files with 54 additions and 40 deletions

View File

@ -1,14 +1,16 @@
/* global chrome */
document.addEventListener('DOMContentLoaded', () => {
chrome.storage.sync.get(['endpoint', 'token'], (data) => {
chrome.storage.sync.get(['endpoint', 'token', 'artworkEndpoint'], (data) => {
document.getElementById('endpoint').value = data.endpoint || '';
document.getElementById('token').value = data.token || '';
document.getElementById('artworkEndpoint').value = data.artworkEndpoint || '';
});
document.getElementById('save').addEventListener('click', () => {
const endpoint = document.getElementById('endpoint').value;
const token = document.getElementById('token').value;
chrome.storage.sync.set({ endpoint, token }, () => {
const artworkEndpoint = document.getElementById('artworkEndpoint').value;
chrome.storage.sync.set({ endpoint, token, artworkEndpoint }, () => {
alert('Settings saved.');
});
});