~callum/beavers-dam

0c5abc47e92ad00a86b18ab4644d66151011149e — Callum Brown 1 year, 2 months ago 52e40d1
Add clear storage button for development
2 files changed, 10 insertions(+), 0 deletions(-)

M popup/popup.html
M popup/popup.js
M popup/popup.html => popup/popup.html +2 -0
@@ 10,5 10,7 @@
		<textarea id="domains-to-dam"></textarea>
		<div id="status"></div>
		<button id="save">Save</button>
		<br>
		<button id="clear">Clear storage</button>
	</body>
</html>

M popup/popup.js => popup/popup.js +8 -0
@@ 24,3 24,11 @@ const restoreSettings = () => {

document.addEventListener("DOMContentLoaded", restoreSettings);
document.getElementById("save").addEventListener("click", saveSettings);

document.getElementById("clear").addEventListener(
	"click",
	() => {
		chrome.storage.sync.clear();
		chrome.storage.local.clear();
	},
);