feat: clear btn in web

This commit is contained in:
2024-06-18 20:47:54 +03:00
parent 893b925a04
commit 34c0ea5fa1
2 changed files with 6 additions and 0 deletions

View File

@@ -53,6 +53,11 @@
var numColor = parseInt(hexColor, 16);
appState.changeColor(numColor, false);
});
let clearBtn = document.getElementById('clearBtn');
clearBtn.addEventListener('click', function () {
localStorage.clear();
window.location.reload();
});
function onError() {
console.error('aboba');