diff options
-rw-r--r-- | index.html | 3 | ||||
-rw-r--r-- | script.js | 11 |
2 files changed, 14 insertions, 0 deletions
@@ -18,6 +18,9 @@ <svg id="clean" class="feather"> <use href="feather-sprite.svg#trash" /> </svg> + <svg id="restart" class="feather"> + <use href="feather-sprite.svg#refresh-ccw" /> + </svg> <svg id="help" class="feather"> <use href="feather-sprite.svg#help-circle" /> </svg> @@ -302,3 +302,14 @@ window.github.addEventListener("click", () => { window.support.addEventListener("click", () => { window.open("https://ko-fi.com/marvinborner", "_blank"); }); + +window.restart.addEventListener("click", () => { + if ( + !confirm( + "Are you sure you want to restart? You will lose your entire inventory.", + ) + ) + return; + localStorage.clear(); + window.location.reload(); +}); |