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:
@ -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.');
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user