Initial Commit

This commit is contained in:
Jordan Wages 2025-06-15 21:55:35 -05:00
commit eb02c6f3bd
13 changed files with 718 additions and 0 deletions

14
options/options.js Normal file
View file

@ -0,0 +1,14 @@
document.addEventListener('DOMContentLoaded', async () => {
let { endpoint = 'http://127.0.0.1:5000/v1/classify' } = await browser.storage.local.get(['endpoint']);
document.getElementById('endpoint').value = endpoint;
});
document.getElementById('save').addEventListener('click', async () => {
const endpoint = document.getElementById('endpoint').value;
await browser.storage.local.set({ endpoint });
try {
await browser.aiFilter.initConfig({ endpoint });
} catch (e) {
console.error('[ai-filter][options] failed to apply config', e);
}
});