Created
February 2, 2023 22:03
-
-
Save BlairCurrey/e48d7d0c234c343f1b5226f3f285de69 to your computer and use it in GitHub Desktop.
Hides code coverage "missing coverage" card element warnings from github pull requests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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