Add a "reset cache" button to settings

This commit is contained in:
ItsVipra 2023-05-27 19:38:33 +02:00
parent 32843618a6
commit 8eb1a7b832
3 changed files with 3 additions and 0 deletions

View file

@ -44,6 +44,7 @@ input {
padding: 1em;
border-top: 1px dashed var(--border);
display: flex;
gap: .5em;
align-items: baseline;
justify-content: space-between;
}

View file

@ -15,6 +15,7 @@
</div>
<div class="footer">
<button type="submit">Save</button>
<button id="resetbutton" type="button">Reset Cache</button>
<a target="_blank" href="https://github.com/ItsVipra/ProToots"
>More info / help on Github</a
>

View file

@ -20,3 +20,4 @@ function restoreOptions() {
document.addEventListener("DOMContentLoaded", restoreOptions);
document.querySelector("form").addEventListener("submit", saveOptions);
document.querySelector("#resetbutton").addEventListener("click", async () => {await browser.storage.local.clear()})