initial commit
This commit is contained in:
14
options.js
Normal file
14
options.js
Normal file
@ -0,0 +1,14 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
chrome.storage.sync.get(['endpoint', 'token'], (data) => {
|
||||
document.getElementById('endpoint').value = data.endpoint || '';
|
||||
document.getElementById('token').value = data.token || '';
|
||||
});
|
||||
|
||||
document.getElementById('save').addEventListener('click', () => {
|
||||
const endpoint = document.getElementById('endpoint').value;
|
||||
const token = document.getElementById('token').value;
|
||||
chrome.storage.sync.set({ endpoint, token }, () => {
|
||||
alert('Settings saved.');
|
||||
});
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user