document.addEventListener("DOMContentLoaded", function() {
chrome.storage.sync.get({"bgvalue": "#2E3440"}, bgCallback);
-});
-var bgCallback = function(list) {
-var color = list["bgvalue"];
-console.log(color);
-document.body.style.background = color;
-};
-document.addEventListener("DOMContentLoaded", function() {
chrome.storage.sync.get({"fgvalue": "#ECEFF4"}, fgCallback);
});
-var fgCallback = function(list) {
-var color = list["fgvalue"];
-console.log(color);
-document.body.style.color = color;
-};
+
+var bgCallback = function(colourPref) { document.body.style.background = colourPref["bgvalue"]; };
+var fgCallback = function(colourPref) { document.body.style.color = colourPref["fgvalue"]; };