Skip to content

Instantly share code, notes, and snippets.

@rukeba
Created August 12, 2018 09:16
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 rukeba/b5fc62c678e3c09d8c5d97971d8b6d69 to your computer and use it in GitHub Desktop.
Save rukeba/b5fc62c678e3c09d8c5d97971d8b6d69 to your computer and use it in GitHub Desktop.
500px: Mark followers in following list
// open followers popup
var followers = [];
jQuery('.follower_modal .actor .name').each(function(i, el){
followers.push(jQuery(el).attr('href'))
});
// close followers popup
// open following popup
jQuery('.follower_modal .actor .name').each(function(i, el){
var $el = jQuery(el);
var href = $el.attr('href');
if (followers.includes(href)){
$el.addClass('my-follower');
} else {
$el.addClass('not-my-follower');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment