Created
August 31, 2019 16:31
-
-
Save kenwarner/780664bf8eb0493f5bb2e771a9cd9064 to your computer and use it in GitHub Desktop.
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
// run this in the dev console on RealClearPolitics polling chart pages | |
// https://www.realclearpolitics.com/epolls/2020/president/us/2020_democratic_presidential_nomination-6730.html | |
function hide(c, idx) { | |
c.forEach(function (ci) { | |
Array.from(document.getElementsByClassName(ci)).forEach((el, i) => { | |
el.style.visibility = 'visible'; | |
if (!idx.includes(i)) el.style.visibility = 'hidden'; | |
}); | |
}); | |
}; | |
hide(['spread_line', 'spread_area', 'spread_tooltip', 'spread_circle'], []); | |
hide(['candidate_line', 'candidate_tooltip', 'candidate_circle'], [0, 1, 2, 3, 4, 5]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment