Restructured and setting up to merge to Forgejo

This commit is contained in:
Sean 2024-12-18 17:40:53 -05:00
parent 1d973f1be1
commit 2e5e0f2d44
8 changed files with 294 additions and 0 deletions

16
extension/options.js Normal file
View 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;
})();