|
@ -0,0 +1,19 @@ |
|
|
|
|
|
let changeColor = document.getElementById('changeColor'); |
|
|
|
|
|
chrome.storage.sync.get('color', function(data) { |
|
|
|
|
|
changeColor.style.backgroundColor = data.color; |
|
|
|
|
|
changeColor.setAttribute('value', data.color); |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
let mOverlay = document.createElement("div"); |
|
|
|
|
|
mOverlay.innerHTML = "<b>QUQ</b>"; |
|
|
|
|
|
|
|
|
|
|
|
changeColor.onclick = function(element) { |
|
|
|
|
|
// TODO: Add settings to STORAGE
|
|
|
|
|
|
|
|
|
|
|
|
let color = element.target.value; |
|
|
|
|
|
chrome.tabs.query({active: true, currentWindow: true}, function(tabs) { |
|
|
|
|
|
chrome.tabs.executeScript( |
|
|
|
|
|
tabs[0].id, |
|
|
|
|
|
{file: 'contentScript.js'}); |
|
|
|
|
|
}); |
|
|
|
|
|
}; |