Last active
December 30, 2015 00:36
-
-
Save dsiddy/748c72ee1aefc39d2c95 to your computer and use it in GitHub Desktop.
console one-liners
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
// block all tracking domains detected by Privacy Badger | |
jQuery('#blockedResources .clickerContainer input[id^=block]').each(function(index, element) { $(element).click() }); | |
// Republican presidential debate speaker counts | |
// @see http://www.nytimes.com/2015/12/16/us/politics/transcript-main-republican-presidential-debate.html | |
console.log(['PAUL', 'CHRISTIE', 'BUSH', 'CRUZ', 'TRUMP', 'CARSON', 'RUBIO', 'FIORINA', 'KASICH'].map(function(candidate) { return document.querySelector('#story-body').textContent.match(new RegExp(candidate, 'g')).length })); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment