Prank: Facebook Friend Swarm September 9, 2010

Next time when your careless friends leave their Facebook screen open, you can swamp them with imaginary friend requests. You can pull the same trick to your own screen, and the impact on your nosy friends is equally dramatic!

Copy the following line of code, and paste it in the URL address bar in the Facebook window:



You can make it even more convenient by dragging the following bookmarklet to your bookmarks toolbar.

Make me popular!

For the convenience of the curious minds, here is the code again in an easier to read format:
r=document.getElementById('jewelRequest');
os=r.getElementsByTagName('span');
d=document.getElementById('jewelRequestCount');
for (i=0;i<os.length;i++) if (os[i].className&&os[i].className=='jewelCount') c=os[i];
c.style.display='inline';
c.inc=0;
f=function(mc,md){return function(){
   mc.inc++;
   md.innerHTML=mc.inc;
   if (mc.inc<50)
       setTimeout(f(mc,md),parseInt(Math.random()*50000,10)+2000);
}};
f(c,d)();
void(0);
The above code grabs the references to the friend request container and counter only once, and passes them to a function that returns a function. This nested function declaration is not only necessary to bind the references but also makes the code compact and efficient.

Of course this prank script is not officially supported, but you're welcome to fan our Facebook page and ask any web development related questions.

Our Services

Targeted Crawlers

Crawlers for content extraction, restoration and competitive intelligence gathering.

Learn More

Gyroscope™ ERP Solutions

Fully integrated enterprise solutions for rapid and steady growth.

Learn More

E-Commerce

Self-updating websites with product catalog and payment processing.

Learn More