Skip to content

Instantly share code, notes, and snippets.

@isaksky
Created July 9, 2012 05:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save isaksky/3074461 to your computer and use it in GitHub Desktop.
Save isaksky/3074461 to your computer and use it in GitHub Desktop.
How to win
// How to win. Script for okcupid.com
// Using a script manager, e.g., this thing: https://github.com/defunkt/dotjs
// Replace cities_close_enough array with what is close enough for you.
// Drop this in ~/.js/okcupid.com.js
window.setInterval(function(){
$('p.location:visible').each(function(){
var loc = $(this).text();
var city = loc.substring(0,loc.indexOf(','));
var cities_close_enough = ['Palo Alto', 'Mountain View', 'Sunnyvale', 'Stanford'];
if(cities_close_enough.indexOf(city) === -1){
if(console) { console.log("hiding some girl from " + '"' + city + '"'); }
$(this).closest('div.match_row').hide('slow');
}
});
}, 500);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment