You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
429 B
JavaScript
17 lines
429 B
JavaScript
3 years ago
|
let page = document.getElementById("buttonDiv");
|
||
|
let selectedClassName = "current";
|
||
|
|
||
|
let colorPicker = document.getElementById("colorPicker");
|
||
|
|
||
|
colorPicker.addEventListener("change", () => {
|
||
|
let color = colorPicker.value;
|
||
|
chrome.storage.sync.set({ color });
|
||
|
});
|
||
|
|
||
|
window.addEventListener("load", () => {
|
||
|
chrome.storage.sync.get("color", (data) => {
|
||
|
let currentColor = data.color;
|
||
|
colorPicker.value = currentColor;
|
||
|
});
|
||
|
});
|