Skip to content

Instantly share code, notes, and snippets.

@philipp-spiess
Created June 2, 2013 21:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philipp-spiess/404d8b82c0298df2d9a5 to your computer and use it in GitHub Desktop.
Save philipp-spiess/404d8b82c0298df2d9a5 to your computer and use it in GitHub Desktop.
A script we use to find potential customers on the http://500px.com/popuar page.
/*
A script we use to find potential customers on the http://500px.com/popuar page.
*/
jQuery('.photo').each(function(_, data) {
var photo = jQuery(data);
var profile = photo.find('.info a').attr('href');
jQuery.get(profile, function(data) {
var user_page = jQuery(data);
var find = function(v) {
return user_page.find(v).attr('href');
}
var user = {
name: find('.username a').replace('/', ''),
website: find('#Website'),
facebook_page: find('#FBPage'),
twitter: find('#Twitter'),
facebook: find('#Facebook'),
skype: find('#Skype'),
flickr: find('#Flickr'),
google_plus: find('#Google')
}
if((user.facebook || user.facebook_page) && user.flickr){
console.log(user);
} else {
photo.css('opacity', .3);
}
});
});
/*
Bookmarklet:
javascript:(jQuery(".photo").each(function(e,t){var n=jQuery(t);var r=n.find(".info a").attr("href");jQuery.get(r,function(e){var t=jQuery(e);var r=function(e){return t.find(e).attr("href")};var i={name:r(".username a").replace("/",""),website:r("#Website"),facebook_page:r("#FBPage"),twitter:r("#Twitter"),facebook:r("#Facebook"),skype:r("#Skype"),flickr:r("#Flickr"),google_plus:r("#Google")};if((i.facebook||i.facebook_page)&&i.flickr){console.log(i)}else{n.css("opacity",.3)}})}));
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment