Skip to content

Instantly share code, notes, and snippets.

@zdwolfe
Created April 8, 2017 18:20
Show Gist options
  • Save zdwolfe/cdf251faa61246bb851d2179ef37ddbf to your computer and use it in GitHub Desktop.
Save zdwolfe/cdf251faa61246bb851d2179ef37ddbf to your computer and use it in GitHub Desktop.
// ==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