MapMyGlobe

Facebook Auto Hide Status Updates

A new Facebook script: this new one enables you to delete all the stories in your mini-feed (like, “Jean-Claude and XXX are now friends.”, cf. the screenshot below). I’m seriously thinking about putting all my scripts into a big Greasemonkey Facebook utility! :)


mini-feed.gif


This one was a bit harder to write. The first reason is that when you click on an item’s cross to delete it, you have to click on another button on a popup to confirm. That could have been done with a timeout, which would leave time to Facebook’s DOM scripting to do its thing.

However, this method doesn’t work. The reason is that Facebook’s minifeed_hide_click(), which is called on cross click, is context-dependent. So, I had to dig through the code for that minifeed_hide_click() function, find the relevant piece of code, and I end up directly calling the Ajax method to perform the request to Facebook’s servers, bypassing the context check.

The final code, that you need to run in http://www.facebook.com/minifeed.php, is the following:

var storys = $$('div.story');
for (var i = 0; i < storys.length; i++){
  var sid = storys[i].id.substr(6);
  ajax=new Ajax();
  ajax.onDone=function(){};
  ajax.onFail=function(){aiert(tx('prf:error-hide-mf'));};
  var post={'hide_ministory_key':sid,'profile_fbid':PROFILE_FBID};
  ajax.post('/ajax/minifeed.php',post,true);
}

11 Responses to “Facebook Auto Hide Status Updates”

  1. Virginia Says:

    How do you run the code on that page? I’m using Safari on a Mac.

  2. Zed Starflight Says:

    http://thefullpint.com/beer-news/2009-pbr-art-contest-winners

  3. พระเครื่อง Says:

    We just like this website shown and that has presented myself a few sort of commitment to succeed for some reason, so thanks.

  4. buy penis pills now Says:

    Love all the opinions expressed here! How is everyone? Love how everyone expresses whatr they feel :)

  5. Bee Roye Says:

    Thank you so much for writing a lot of this good information! I am looking forward to seeintg more blogs!

  6. Ethyl Alnoor Says:

    Cool news it is definitely. My boss has been looking for this content.

  7. Marcus @ Befar Says:

    The guys at Facebook must be bored. Hardly anyone likes their changes. Most just move around the locations of information.

  8. Antone Ryans Says:

    This web site is really a walk-through for all of the info you wanted about this and didn’t know who to ask. Glimpse here, and you’ll definitely discover it.

  9. qwew Says:

    weqewerrw

  10. icemabn Says:

    I’m interested in finding out about the availability of Grants for debts relief,for the handicapped and disabled.Would greatly appreciate any info.Thanks and may God bless you.

  11. Tactics For IBS Treatment - Guideline Ideas Says:

    Theories about the mechanistic origin of the universe come and go. Modern day “science” is tomorrow’s superstition. A couple of years ago researchers ended up touting the continual-state theory as the most reasonable explanation of the origin of the universe. It asserted that new issue is consistently being designed to exchange that which is misplaced by the increasing universe. “These days most astronomers consider the regular-state idea as dead” (Weaver 1974, 625).

Leave a Reply