Created
April 8, 2017 18:20
-
-
Save zdwolfe/cdf251faa61246bb851d2179ef37ddbf 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
// ==UserScript== | |
// @name Hide dog breeds | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://www.petfinder.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var jq = document.createElement('script'); | |
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
jQuery.noConflict(); | |
var i = setInterval(function() { | |
console.log('hidden'); | |
var breeds = ['bull', 'akita', 'chow chow', 'doberman', 'pinscher', 'german shepard', 'great dane', 'rottweiler']; | |
breeds.forEach(function(breed) { | |
$('.breed').filter(function() {return $(this).text().toLowerCase().includes(breed);}).closest('li').hide(); | |
}); | |
clearInterval(i); | |
}, 1000); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment