Work around some (usually helpful) Firefox behaviour when creating multiple secrets.

This commit is contained in:
Marsell Kukuljevic 2026-01-16 10:55:16 +00:00
parent 8df9cc54cb
commit e28b8241ef

View File

@ -113,7 +113,7 @@
<button
class="btn"
style="background: #444"
onclick="location.reload()"
onclick="reload()"
>
Create Another
</button>
@ -164,6 +164,13 @@
if (window.location.hash.includes("id=")) initDecryption();
};
// This is a workaround for Firefox trying to be helpful. Most
// browsers clear content on reload, but Firefox does not.
async function reload() {
document.getElementById("text").value = "";
window.location.reload();
}
async function burnIt() {
const text = document.getElementById("text").value;
if (!text) return;