feat: add focus color

This commit is contained in:
nafunii 2022-01-10 12:33:52 +08:00
parent db8f41367a
commit 171d32f21e
No known key found for this signature in database
GPG key ID: 0A82862EF6000AE3
2 changed files with 4 additions and 1 deletions

View file

@ -1,5 +1,6 @@
chrome.storage.sync.get('a1', ({ a1 }) => {
setTimeout(function() {
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");
@ -8,6 +9,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

@ -27,7 +27,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++) {