~callum/beavers-dam

ff4ce6078517eee2f24031eb2dc216deca54706b — Callum Brown 1 year, 27 days ago 599e29a main
Update listener on import
3 files changed, 5 insertions(+), 3 deletions(-)

M options/options.js
M popup/popup.js
M todo
M options/options.js => options/options.js +3 -0
@@ 48,6 48,9 @@ async function importData() {
			// See docs for StorageArea.set
			await chrome.storage.sync.set(data["sync"]);
			await chrome.storage.local.set(data["local"]);
			await chrome.runtime.sendMessage(
				{ updatedDammed: data["sync"]["dammed"] }
			);
			window.alert("Import successful");
			location.reload();
		});

M popup/popup.js => popup/popup.js +1 -3
@@ 44,9 44,7 @@ document.getElementById("clear").addEventListener(
	async () => {
		await chrome.storage.sync.clear();
		await chrome.storage.local.clear();
		await chrome.runtime.sendMessage(
			{ updatedDammed: [] }
		);
		await chrome.runtime.sendMessage({ updatedDammed: [] });
	},
);


M todo => todo +1 -0
@@ 9,5 9,6 @@ Type check before saving options

Fix dammedURL being overwritten when dam for one site is left
and in the meantime another site is dammed.
and maybe use session instead of local storage

Forbid damming the extension