Restructured and setting up to merge to Forgejo
This commit is contained in:
parent
1d973f1be1
commit
2e5e0f2d44
8 changed files with 294 additions and 0 deletions
16
extension/options.js
Normal file
16
extension/options.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// options.js
|
||||
|
||||
document.getElementById('save').addEventListener("click", async () => {
|
||||
const token = document.getElementById('token').value;
|
||||
const url = document.getElementById('url').value;
|
||||
|
||||
await browser.storage.local.set({ token, url });
|
||||
alert('Options saved!');
|
||||
});
|
||||
|
||||
// Load saved settings if they exist
|
||||
(async () => {
|
||||
const { token, url } = await browser.storage.local.get(['token', 'url']);
|
||||
if (token) document.getElementById('token').value = token;
|
||||
if (url) document.getElementById('url').value = url;
|
||||
})();
|
||||
Loading…
Add table
Add a link
Reference in a new issue