Skip to content

Instantly share code, notes, and snippets.

@samuelcolvin
Last active July 21, 2022 21:20
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samuelcolvin/da925c0918b23aea2f05210af597d05d to your computer and use it in GitHub Desktop.
Save samuelcolvin/da925c0918b23aea2f05210af597d05d to your computer and use it in GitHub Desktop.
javascript:(function(){
const set_color = (cls, col) => document.querySelectorAll(cls).forEach(el => {
el.parentNode.style.backgroundColor = col;
el.parentNode.querySelectorAll('td').forEach(td => {td.style.backgroundColor = col});
});
set_color('.bg-ds-coverage-partial', '#ffa');
set_color('.bg-ds-coverage-uncovered', '#fdd');
})();
@samuelcolvin
Copy link
Author

Usage:

  • Create a new bookmark
  • copy the above js into the "link"
  • call it some like "Codecov Colors" (or "Colours" if you come from a country that spells properly)
  • click it when viewing code in codecov to apply easier to view colors

@ssbarnea
Copy link

They could have easily implemented a color-blind settings that was fully client-side without much effort, but someone needs to think about that.

@samuelcolvin
Copy link
Author

I've updated this script to work with the new horrid theme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment