forked from Spearhead/privateburn
Work around some (usually helpful) Firefox behaviour when creating multiple secrets.
This commit is contained in:
parent
8df9cc54cb
commit
e28b8241ef
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user