Skip to content

Instantly share code, notes, and snippets.

@BlairCurrey
Created February 2, 2023 22:03
Show Gist options
  • Save BlairCurrey/e48d7d0c234c343f1b5226f3f285de69 to your computer and use it in GitHub Desktop.
Save BlairCurrey/e48d7d0c234c343f1b5226f3f285de69 to your computer and use it in GitHub Desktop.
Hides code coverage "missing coverage" card element warnings from github pull requests
// hides the code coverage boxes on gh file pr diff view.
// added this because it makes it difficult to read
const rule = '.check-annotation-warning { display: none; }'
const sheet = window.document.styleSheets[0];
sheet.insertRule(rule, sheet.cssRules.length);
// workaround to make snippet gloab fn
// can run hideCC() from console
window.hideCC = function (value) {
const sheet = window.document.styleSheets[0];
sheet.insertRule(rule, sheet.cssRules.length);
console.log(`Added rule: ${rule}`)
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment