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
|
<button
|
||||||
class="btn"
|
class="btn"
|
||||||
style="background: #444"
|
style="background: #444"
|
||||||
onclick="location.reload()"
|
onclick="reload()"
|
||||||
>
|
>
|
||||||
Create Another
|
Create Another
|
||||||
</button>
|
</button>
|
||||||
@ -164,6 +164,13 @@
|
|||||||
if (window.location.hash.includes("id=")) initDecryption();
|
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() {
|
async function burnIt() {
|
||||||
const text = document.getElementById("text").value;
|
const text = document.getElementById("text").value;
|
||||||
if (!text) return;
|
if (!text) return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user