feat: clear btn in web
This commit is contained in:
@@ -45,6 +45,7 @@
|
|||||||
<button id="token2">Token btn 2</button>
|
<button id="token2">Token btn 2</button>
|
||||||
<button id="colorChangeBtnRed">Color btn Red</button>
|
<button id="colorChangeBtnRed">Color btn Red</button>
|
||||||
<button id="colorChangeBtnBlue">Color btn Blue</button>
|
<button id="colorChangeBtnBlue">Color btn Blue</button>
|
||||||
|
<button id="clearBtn">Clear</button>
|
||||||
<section class="contents">
|
<section class="contents">
|
||||||
<article>
|
<article>
|
||||||
<div id="flutter_target"></div>
|
<div id="flutter_target"></div>
|
||||||
|
|||||||
@@ -53,6 +53,11 @@
|
|||||||
var numColor = parseInt(hexColor, 16);
|
var numColor = parseInt(hexColor, 16);
|
||||||
appState.changeColor(numColor, false);
|
appState.changeColor(numColor, false);
|
||||||
});
|
});
|
||||||
|
let clearBtn = document.getElementById('clearBtn');
|
||||||
|
clearBtn.addEventListener('click', function () {
|
||||||
|
localStorage.clear();
|
||||||
|
window.location.reload();
|
||||||
|
});
|
||||||
|
|
||||||
function onError() {
|
function onError() {
|
||||||
console.error('aboba');
|
console.error('aboba');
|
||||||
|
|||||||
Reference in New Issue
Block a user