Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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