Skip to content

Commit

Permalink
Set text color so declined events don't have weird color text. Fix #63
Browse files Browse the repository at this point in the history
  • Loading branch information
imightbeamy committed Jun 9, 2019
1 parent f916970 commit 69c13a2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions events.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const mergeEventElements = (events) => {
visibility: eventToKeep.style.visibility,
width: eventToKeep.style.width,
border: eventToKeep.style.border,
borderColor: eventToKeep.style.borderColor,
textShadow: eventToKeep.style.textShadow,
};
eventToKeep.style.backgroundImage = stripesGradient(colors, 10, 45);
Expand All @@ -82,6 +83,9 @@ const mergeEventElements = (events) => {
eventToKeep.style.width = null;
eventToKeep.style.border = "solid 1px #FFF";

// Clear setting color for declined events
eventToKeep.querySelector('[aria-hidden="true"]').style.color = null;

const computedSpanStyle = window.getComputedStyle(eventToKeep.querySelector('span'));
if (computedSpanStyle.color == "rgb(255, 255, 255)") {
eventToKeep.style.textShadow = "0px 0px 2px black";
Expand Down

0 comments on commit 69c13a2

Please sign in to comment.