fix: add Reset Everything button + improve reveal mode reliability

Storage issue: Chromium/Brave keeps storage.local data even when
an unpacked extension is removed and reloaded. Added "Reset
Everything" button in Options → Danger Zone that clears all data
(double-confirm to prevent accidents).

Reveal mode: Now re-runs revealAllResponses() every 2 seconds
while active to catch streamed content and dynamically loaded
responses. Adds console logging for reveal toggle state changes
to aid debugging. Cleans up interval when reveal mode is turned off.

https://claude.ai/code/session_01Dvgwe7XMoSxnWXkih8p1Cw
This commit is contained in:
Claude
2026-03-26 03:18:59 +00:00
parent 1995208941
commit c72971edaf
3 changed files with 34 additions and 2 deletions
+13
View File
@@ -92,6 +92,19 @@ document.addEventListener('DOMContentLoaded', async () => {
await Storage.clearLog();
renderLog();
});
// Reset all data
$('#btnResetAll').addEventListener('click', async () => {
if (!confirm('This will delete ALL your identities, mappings, settings, and logs.\n\nAre you sure?')) return;
if (!confirm('Really? This cannot be undone.')) return;
await api.storage.local.clear();
mappings = [];
settings = {};
renderMappings();
renderDomains();
renderLog();
alert('All data cleared. Reload the extension to start fresh.');
});
});
async function addMapping() {