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
+11
View File
@@ -135,6 +135,17 @@
<div class="log-list" id="logList"></div>
</section>
<section class="section">
<h2>Danger Zone</h2>
<div class="setting-row">
<div>
<label>Reset all data</label>
<p class="setting-desc">Clears all identities, mappings, settings, and logs. Cannot be undone.</p>
</div>
<button class="btn btn-danger" id="btnResetAll">Reset Everything</button>
</div>
</section>
<footer>
<p>Silent Send v0.3.0</p>
</footer>
+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() {