Merge pull request #4 from nafunii/dev

feat, cleanup: fix broken extension, add focus color
This commit is contained in:
Jariel Que 2022-01-10 12:37:09 +08:00 committed by GitHub
commit b1db0bf2b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -8,6 +8,7 @@ chrome.storage.sync.get('a1', ({ a1 }) => {
document.querySelector(':root').style.setProperty('--color-btn-primary-bg', a1 + "ff", "important");
document.querySelector(':root').style.setProperty('--color-btn-primary-hover-bg', a1 + "c5", "important");
document.querySelector(':root').style.setProperty('--color-btn-primary-active-bg', a1 + "8a", "important");
document.querySelector(':root').style.setProperty('--color-btn-primary-focus-bg', a1 + "8a", "important");
document.querySelector(':root').style.setProperty('--color-btn-primary-disabled-bg', a1 + "54", "important");
document.querySelector('.js-highlight-blob').style.setProperty('fill', a1 + "c5", "important");
document.querySelector('.js-highlight-blob').style.setProperty('stroke', a1 + "ff", "important");

View file

@ -18,7 +18,6 @@ changeColor.addEventListener("change", async() => {
function setAccent() {
chrome.storage.sync.get('a1', ({ a1 }) => {
document.querySelector('.Progress-item.rounded-2').style.setProperty('background-color', a1 + "ff", "important");
document.querySelector(':root').style.setProperty('--color-calendar-graph-day-L4-bg', a1 + "ff", "important");
document.querySelector(':root').style.setProperty('--color-calendar-graph-day-L3-bg', a1 + "c5", "important");
document.querySelector(':root').style.setProperty('--color-calendar-graph-day-L2-bg', a1 + "8a", "important");
@ -27,7 +26,8 @@ function setAccent() {
document.querySelector(':root').style.setProperty('--color-btn-primary-bg', a1 + "ff", "important");
document.querySelector(':root').style.setProperty('--color-btn-primary-hover-bg', a1 + "c5", "important");
document.querySelector(':root').style.setProperty('--color-btn-primary-active-bg', a1 + "8a", "important");
document.querySelector(':root').style.setProperty('--color-btn-primary-disabled-bg', a1 + "54", "important")
document.querySelector(':root').style.setProperty('--color-btn-primary-focus-bg', a1 + "8a", "important");
document.querySelector(':root').style.setProperty('--color-btn-primary-disabled-bg', a1 + "54", "important");
document.querySelector('.js-highlight-blob').style.setProperty('fill', a1 + "c5", "important");
document.querySelector('.js-highlight-blob').style.setProperty('stroke', a1 + "ff", "important");
for (let i = 0; i < document.querySelectorAll('.Progress-item.rounded-2').length; i++) {