I'd like to announce a pet project of mine - a piece of Javascript that adds the "is a follower" indicator to the user's profile. Various indicator states are as attached.
Everyone else - proceed to this page for the bookmarklet.
Checked to work in recent Firefox and Mobile Safari. It should work in all modern browsers that support localStorage. Pretty much guaranteed not to work in IE :)
--
It works by pulling off your Followers list via Dribbble API and comparing user's ID from the currently viewed profile page against this list. The code does decent job at trying to stay really fast. For one, it caches the list locally. For two, it updates the list only if the number of your followers changes or if it were a week since the last update (in case if some people followed and the same number of people un-followed). For three, when it updates the list, it does so incrementally, stopping once it picks up all the changes.
That being said, on the first run it needs to download the entire list. The API allows querying the list in 30 follower increments, and it imposes a cap of 60 requests/min. The code therefore implements request throttling - sending first 30 requests back to back, next 30 - 500 ms apart and spacing out the rest in 1 second intervals. Dumbed down, this means that if you have a lot of followers (in thousands), your first update may take few seconds (minutes). Consider it a social wealth tax :) Be patient, there is always a dynamically updated progress indicator in a tooltip to entertain you.
--
The code is on Github. The copyright is mine, but otherwise feel free to do what you want with it.... debug it on IE, for example (because I am not doing that for sure).
--
Lastly, a Chrome extension would be nice to have, but I don't have time for it. The code is well structured and it should be easy to wrap into an extension. The bookmarklet and the GM script are 99% the same, differing only in few lines at the top.
Great idea! Do you think it would be wise to introduce some color for the "not follwing" and "error" state? maybe yellow, red or something. Good luck with this, and make sure to keep us in the loop on how this pans out.
@Joe - oh, common, dude. Bookmark that bookmarklet, click on it when on this page and see the magic :)
@Mario - It has already panned out :) With regards to the color - I tried and kept it consistent with native styling. Besides, it's a secondary widget so for it to go all alarmed and blinking is probably not the best idea. The error state should really be noticeable only if the user is interested in this info.
@Neil - you need to click on the bookmark (to run the code that is in it) on Dribbble user's profile page, e.g. this one.
Naturally, this is too much hassle for many, so there are ways to automate this clicking. In Firefox this is what Greasemonkey is for. In Chrome, there's this will be in a form of extensions. And on Safari.. I frankly don't know, but I'm sure there's an equivalent.
Would love to see this combined with the Chrome plugin Jord posted. That way we could see if they are following us both on their shot, and on their profile :)
28 Responses (page 1 of 2)
Pro
Alex Pankratov
A a piece of Javascript that adds the "is a follower" status to the Dribbble user's profile and shot pages.
Homepage: http://swapped.cc/iip
---- (original comment) ----
I'd like to announce a pet project of mine - a piece of Javascript that adds the "is a follower" indicator to the user's profile. Various indicator states are as attached.
--
Firefox users with Greasemonkey - isFollower.user.js
Chrome extension - isFollower.crx
Everyone else - proceed to this page for the bookmarklet.
Checked to work in recent Firefox and Mobile Safari. It should work in all modern browsers that support localStorage. Pretty much guaranteed not to work in IE :)
--
It works by pulling off your Followers list via Dribbble API and comparing user's ID from the currently viewed profile page against this list. The code does decent job at trying to stay really fast. For one, it caches the list locally. For two, it updates the list only if the number of your followers changes or if it were a week since the last update (in case if some people followed and the same number of people un-followed). For three, when it updates the list, it does so incrementally, stopping once it picks up all the changes.
That being said, on the first run it needs to download the entire list. The API allows querying the list in 30 follower increments, and it imposes a cap of 60 requests/min. The code therefore implements request throttling - sending first 30 requests back to back, next 30 - 500 ms apart and spacing out the rest in 1 second intervals. Dumbed down, this means that if you have a lot of followers (in thousands), your first update may take few seconds (minutes). Consider it a social wealth tax :) Be patient, there is always a dynamically updated progress indicator in a tooltip to entertain you.
--
The code is on Github. The copyright is mine, but otherwise feel free to do what you want with it.... debug it on IE, for example (because I am not doing that for sure).
--
Lastly, a Chrome extension would be nice to have, but I don't have time for it. The code is well structured and it should be easy to wrap into an extension. The bookmarklet and the GM script are 99% the same, differing only in few lines at the top.
3 months ago
Looks awesome Alex! I'll check it out when I have some time :)
3 months ago
Pro
Mario Azzi
Great idea! Do you think it would be wise to introduce some color for the "not follwing" and "error" state? maybe yellow, red or something. Good luck with this, and make sure to keep us in the loop on how this pans out.
3 months ago
Pro
Alex Pankratov
@Joe - oh, common, dude. Bookmark that bookmarklet, click on it when on this page and see the magic :)
@Mario - It has already panned out :) With regards to the color - I tried and kept it consistent with native styling. Besides, it's a secondary widget so for it to go all alarmed and blinking is probably not the best idea. The error state should really be noticeable only if the user is interested in this info.
3 months ago
Pro
Mario Azzi
Makes total sense. just a thought :D well, once again good luck.
3 months ago
Nice bookmarklet! I'm still shocked … you aren't following me :d
3 months ago
Pro
Alex Pankratov
@Tobias - must be a bug, lemme check :)
3 months ago
@Alex Pankratov Thanks. Now I can finally sleep well again ;)
3 months ago
Pro
Rogie
@Alex Pankratov very cool! YOU AREN'T FOLLOWING ME.
3 months ago
Pro
Alex Pankratov
@Rogie - I was... before I ran my script.
3 months ago
Pro
Glenn Hitchcock
Sweet, thanks man!
3 months ago
Pro
Kim Wouters
Amazing idea! Love it. A chrome extension would be awesome!
3 months ago
Pro
Neil Tasker
sweet idea!!, but am I missing a step, i just bookmarked it, but nothing is happening?
3 months ago
Pro
Alex Pankratov
@Neil - you need to click on the bookmark (to run the code that is in it) on Dribbble user's profile page, e.g. this one.
Naturally, this is too much hassle for many, so there are ways to automate this clicking. In Firefox this is what Greasemonkey is for. In Chrome, there's this will be in a form of extensions. And on Safari.. I frankly don't know, but I'm sure there's an equivalent.
3 months ago
Pro
Matthias Mentasti
Alex, you're awesome! thanks for that.
3 months ago
Pro
Jord Riekwel
This is quite handy too, for Chrome users: http://drbl.in/bvKz
3 months ago
Pro
Jonno Riekwel
Nice! But super slow :(
Edit: oops, just read the whole text. I'll be patient now :)
3 months ago
Pro
Alex Pankratov
@Jord - heh, and I asked for the Firefox plugin there :)
@Jonno - With 5K followers it will take few minutes, yes. But it's on the first run only, see my top comment for details.
3 months ago
Pro
Alex Pankratov
@Jonno - by the way, it actually shows the progress on that tooltip. Just however your mouse over the bouncing ball it will give you % completed.
(edit) Screenshot
3 months ago
Pro
Josh Riser
Would love to see this combined with the Chrome plugin Jord posted. That way we could see if they are following us both on their shot, and on their profile :)
3 months ago
Pro
Alex Pankratov
@Josh -- I will add that to mine as time permits, I think it's a good idea.
3 months ago
I think it’s really great!
3 months ago
Pro
Ricardo Rauch
Just awesome.
3 months ago
Pro
Didi Medina
works like a charm! cheers :)
3 months ago
super useful !
3 months ago