You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
492 B

  1. let changeColor = document.getElementById('changeColor');
  2. chrome.storage.sync.get('color', function(data) {
  3. changeColor.style.backgroundColor = data.color;
  4. changeColor.setAttribute('value', data.color);
  5. });
  6. changeColor.onclick = function(element) {
  7. // TODO: Add settings to STORAGE
  8. let color = element.target.value;
  9. chrome.tabs.query({active: true, currentWindow: true}, function(tabs) {
  10. chrome.tabs.executeScript(
  11. tabs[0].id,
  12. {file: 'contentScript.js'});
  13. });
  14. };