Add settings configuration, not using it yet

This commit is contained in:
idk
2019-02-07 17:09:31 -05:00
parent c55c810928
commit 9583f680a0
7 changed files with 208 additions and 51 deletions

View File

@@ -4,32 +4,32 @@ browser.windows.onCreated.addListener(themeWindow);
browser.windows.getAll().then(wins => wins.forEach(themeWindow));
function themeWindow(window) {
// Check if the window is in private browsing
if (window.incognito) {
browser.theme.update(window.id, {
images: {
headerURL: "",
},
colors: {
accentcolor: "#A0A0DE",
textcolor: "white",
toolbar: "#A0A0DE",
toolbar_text: "white"
}
});
}
// Reset to the default theme otherwise
else {
browser.theme.update(window.id, {
images: {
headerURL: "",
},
colors: {
accentcolor: "#BFA0DE",
textcolor: "white",
toolbar: "#BFA0DE",
toolbar_text: "white"
}
});
}
// Check if the window is in private browsing
if (window.incognito) {
browser.theme.update(window.id, {
images: {
headerURL: "",
},
colors: {
accentcolor: "#A0A0DE",
textcolor: "white",
toolbar: "#A0A0DE",
toolbar_text: "white"
}
});
}
// Reset to the default theme otherwise
else {
browser.theme.update(window.id, {
images: {
headerURL: "",
},
colors: {
accentcolor: "#BFA0DE",
textcolor: "white",
toolbar: "#BFA0DE",
toolbar_text: "white"
}
});
}
}