MapMyGlobe

Archive for the ‘Hacks’ Category

Delete your Facebook Friends

Friday, March 21st, 2008

A non-neglictible part of this blog’s readers come for my Facebook scripts, which aim at automating a few things via javascript. One of those readers recently suggested a utility for automatically deleting friends. The reason for that is that he’s so popular he hits the 5,000 Facebook friends limit and can’t add any of the 11,000 peeps that sent him a request :) So, a workaround would be to first delete all of his current friends to make room for the new ones.

Now, my solution is not perfect because Facebook displays friends within a 50-items paging system. Which means you would need to run it 100 times to get rid of all your friends. Still, that’s a 50x improvement ratio if you really do need to delete your friends. The code is the following:

var remove = $$('a.remove');
for (var i = 0; i < remove.length; i++){
  remove[i].onclick();
  $('dialog_button1').click();
}

which you need to run at http://www.facebook.com/friends/?all. I also wrote a Greasemonkey script here or at http://userscripts.org/scripts/show/24199. Hope that helps somebody :)

DOM Manipulation and Web design

Tuesday, August 28th, 2007

Just a short post today to introduce the blog’s new header design. The Google Maps screenshots are a reference to the importance of the GMaps API in my web application, mapmyglobe.com. Right now the banner rotates between 4 different locations, which are important to me, because they are the places where this web app will have been conceived and built :)

text-stroke-banner-demo-bos.gif

But then I found out that the blog’s title and catchphrase were very difficult to read. Unfortunately CSS implementation still lacks text-stroke (text displayed on a white surrounding that makes it easier to read, like the text on the GMaps layers). So I’ve put together a quick javascript-and-CSS hack to have any text element that I want being displayed with a stroke. In my case I am stroking the blog’s title and tagline. This hack perfectly exemplifies DOM manipulation’s power, which is what I wrote about last time, so I thought I would write something about it. I’ve made it available right here: Text Stroke effect with Javascript and CSS.

Other than that, the project is moving along nicely, with some major refactoring going on right now… More on that later on.