Internet Social Media

How To Hack Your Facebook Account with Greasemonkey & Javascript

Simon Slangen 11-10-2009

Facebook/Extended Info ImageFacebook is pretty awesome, but it is far from perfect. More than once, I’ve heard complaints about some of Facebook’s technical aspects. Sadly, Facebook isn’t open-sourced, so users can’t change anything themselves – or can they?


By using simple pieces of Javascript code, or by applying Firefox Greasemonkey userscripts, users can change the appearance and workings of Facebook themselves.

Learn how to hack Facebook accounts for fun, or tweak something useful. Believe me, it really is all in your hands.

Facebook Account Javascript Hacks

In these following hacks we’ll be using basic Javascript to toy around with Facebook. Note that we’re not going to hack into Facebook accounts, or anything of the like. Most of these ‘hacks’ are temporary and will disappear once you refresh the page. They also won’t be visible to users on other computers. So why are we doing it? – Because it’s fun!

how to hack facebook accounts

These Javascript snippets, which we’ll supply below, simply need to be pasted into the address bar. Hit enter, et voila!


Changing Profile Colour

This will change the colour of your Facebook bar to a color of choice.

facebook greasemonkey scripts

Just paste the following code in your address bar and hit enter. You can replace ‘red’ with any color you want – black, white, green or even orrange. If you want to reverse the effect, press Ctrl+F5 for a hard reload of the page.





View Chat History with Offline Friends

Unfortunately, you can’t normally view the chat history of online friends. If you’re trying to remember something that was said, waiting for them to come back online is one hell of a bother. Instead, you can just use this – pretty useful – Javascript hack.

First of all, we need to get your friend’s Facebook ID. When you visit his page indirectly (through your friends list or by using the search engine), you’ll be able to see it as a number in the address bar.


how to hack facebook

Another way to retrieve someone’s ID is by going to the Friends widget on their page, and right-clicking See All. Then you’ll have to copy the link location and paste it in your address bar.

how to hack facebook greasemonkey

Once you’ve got someone’s ID, simply paste the following code in your address bar, replacing 1122334455 with the relevant number.






Other Javascript hacks

The preceding two hacks are without doubt the most impressive or useful ones. Below are some of the other tricks you can pull off by using Javascript. We’re not going to deep on this because they’re all things you can do manually as well.

Change chat status to invisible:



Change chat status to visible:



Close all chat windows with person 1122334455:



Open application tab:



Bring up notifications:



Bring up friends list:



Facebook Greasemonkey Hacks

hack facebook account tips

Greasemonkey is one of the best firefox add-ons in existence. By using ‘userscripts’, you can customize nearly every website. Read more about Greasemonkey in . Greasemonkey Makes Firefox Unbeatable Read More

Today we won’t be focusing too hard on Greasemonkey itself, but on some of the great Facebook-specific userscripts.

Facebook Auto-login – One of the simplest, but perhaps also one of the most useful userscripts you’ll find. This one will automatically log into Facebook, as long as Firefox remembers your password, saving you a lot of hassle.

Auto-Colorizer for Facebook – This script will recolor your Facebook page by applying the color scheme of the most dominant picture currently showing on the page. As you can imagine, this can create some exciting, and also ambient effects.

FacebookDeletes – If you want to get rid of a lot of people at once, this is your man. This script can bulk delete friends, making the masacre all the easier.

Remove All Facebook Ads – Adblock still tends to miss a lot of Facebook ads. This script, frequently updated, will remove all thinkable Facebook ads, creating a completely click-safe Facebook environment.

External Apps Blocker – One of the most irritating things on Facebook are the abundance of quizzes, quote generators, and the like. Filtering all external app ‘stories’ from your homepage will be a lot easier if you use this script.

Want some more? Userscripts hosts 1112 Facebook related userscripts at the time of writing. Check it out and have a blast!

If you know any other cool Javascript tweaks, or Greasemonkey hacks, feel free to mention them in the comments section below!

Related topics: Facebook, Greasemonkey, JavaScript.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Anonymous
    December 2, 2015 at 8:41 pm

    do you have headache about a cheating partner? wayward kids? unfaithful worker ? if you need to get access to their facebook, whatsapp, viber , emails , monitor texts and call logs , skype , i was in a tough spot when this fellow helped me out , he is your guy if you need any of these and more done , reach him on cybershadow76 @

  2. Mihajlo
    January 26, 2010 at 5:13 am

    At FB home page you can type:


  3. God Zilla
    December 21, 2009 at 4:20 pm

    I need some help to get on someone elses facebook, because of embarassing photos that he/she will not delete. Can you help me?

  4. maqi
    December 21, 2009 at 10:52 am

    is there any script that can write the info i.e. profile info of my friends to a text file.

  5. noname
    December 21, 2009 at 9:32 am

    yes like many have said this is not hacking....

  6. jurix
    November 29, 2009 at 9:11 am

    thx, good to know.
    Could anyone help: is it possible to open multiple chatwindows with the javascript:buddyList.itemOnClick(…) comand. I mean it is possible to see the chat history of two, or more friends (two or more ID numbers)at once.
    Thanks for the answer

  7. Jangjong
    November 13, 2009 at 3:03 am

    Bro how about adding Group Fans, it is possible…
    to add all the fans of one application… thanks
    waitng for response

  8. mark
    November 2, 2009 at 6:18 am

    i just hope you are smarter then to fall for that junk. all that would be is someone trying to get your informaion, and depending on how open you and your friends are on facebook, they could pretty much find out anything they could ever want. i would change my password NOW.

  9. mchlbk
    October 30, 2009 at 3:47 am

    Dude you need to hit the caps lock key.

    And why would you want access to other people's FB accounts? That's just stupid.

  10. ama
    October 28, 2009 at 12:32 pm

    hi, my boyfriend hack my All old chat history on facebook, and he won't tell me how to do that, can you guy's tell me how to see my all old chat history on Facebook, oh yach, he can see anything I already did on FB like search and my delete message too...

    • mchlbk
      October 28, 2009 at 12:54 pm

      @ama: The only way he can see those things is if he has access to your account. You should get yourself a new (and hard to guess) password immediately.

  11. michael
    October 24, 2009 at 2:46 am

    is there a userscript that shows cleared facebook-chat logs, recent people you chatted with, etc.???

  12. jack kirbala
    October 16, 2009 at 10:57 am

    another vote for facebook purity! fantastic script! it even has a whitelist function for those app messages you dont want to miss! :D

  13. z0iid
    October 12, 2009 at 4:55 pm

    facebook fixer gm script.

  14. Terri
    October 12, 2009 at 8:40 am

    Was just looking for a way to see the friend requests I've sent (not just invitations to people who don't already have an account). Anyone know how to do that?

  15. mjw
    October 12, 2009 at 5:38 am

    that just for fun.
    is there any code, so Facebook user can see, who's viewing their profile?

    • Simon Slangen
      October 12, 2009 at 9:52 am

      'fraid not.

      News Feed and Mini-Feed will never
      publish stories about:

      * Pokes
      * Messages
      * Whose profile you view
      * Whose photos you view
      * Whose notes you read
      * Groups and Events you decline to join
      * People you reject as friends
      * People you remove from your friends
      * Notes and photos you delete

  16. geeknik
    October 11, 2009 at 4:35 pm

    Remove All Facebook Ads is frequently updated? It hasn't been updated since January. Whatever.

  17. JavaScript Countdown Timer
    October 11, 2009 at 8:29 pm

    very cool tut, thank you very much for sharing. But I think these things are just for funny

    Can I ( share this snippet on my JavaScript library?

    Awaiting your response. Thank

  18. OhMyGosh
    October 11, 2009 at 2:06 pm

    This article is the most idiotic thing ive ever seen. An egregious use of the word "hack". Open source??? That's what open source stands for. Facebook is "open", if you were even a touch technically knowledgeable you would know that. The API even has a wiki, it may not be in 4th grade English, but it's there and documented. Stick to myspace or geocities (is that even still around?).


    • anonymous
      October 11, 2009 at 11:53 pm

      hey d-bag "hack" got your attention enough to click to the article then read & comment which means the word did its job.

      You should be the one returning to myspace or die like geocities.

      If you don't like the article don't read it, if you gonna complain make your own site to prove you better.


      • ....
        October 19, 2009 at 10:20 pm

        for an article trying to help people it seems a little odd that the writer used a cheap trick to attract readers. This was definitely written thinking it was hacking (which it absolutely is not)why would the writer keep using the word hack in section titles and why would the Title be How to hack your Facebook account if the writer knew it wasn't hacking. I know it attracted readers but this article is informative it isn't supposed to trick people into reading it its as if you bought how to install your own plumbing for dummies and all the chapters were on making your plumping system run faster. this article is BS


  19. mchlbk
    October 11, 2009 at 1:15 pm

    FB Purity: Removes annoying quiz and application messages from your facebook homepage.

    On the top right you will see the number of application messages blocked. This is my favourite Greasemonkey script.

  20. RougeCrown
    October 11, 2009 at 1:09 pm

    Just go to It actually makes facebook what it originally is.

    All hail lite facebook!

  21. Stefan
    October 11, 2009 at 9:28 am

    External Apps Blocker does not work. Please review your article or tell us any other way. I would love that script to work.

    • Stefan
      October 11, 2009 at 9:52 am

      yeah right, I do that, but 100000000 new applications rise everyday. That way, it is not efficient. Shame on facebook that does not WANT to put an option like "No quizzes/applications on your homepage".

      So, is there any way to block the quizzes/apps on your Homepage??

      • Simon Slangen
        October 11, 2009 at 10:22 am

        It's your lucky day. Check out UnFuck Facebook

        Feature overview
        * App, Fan, Group, and Event invite blocking is done automatically without leaving the home page.
        * Advertisement Removal
        * Hide Applications in the Home Stream and even block them from appearing in the future.
        * Hide App and Fan stories on profiles
        * Hide one-sided wall stories on the home page
        * Make the Home Page two columns
        * Show status on the Home page
        * Place the Highlights section below the others
        * Hide App boxes and tabs on profiles
        * Expand the width of the walls on profiles
        * Remove rounded thumbnails
        * Show older stories on the home page and on profiles automatically
        * Use direct share links
        * Hide App and Fan Highlights

        If you don't want your Facebook layout to be changed, or automatically block all event/fanpage invites:
        * Go to, with the script running
        * Right-click the greasemonkey icon and select User Script Assignments - UnFuck FB Options
        * Here you'll be able to turn on/off all of the tweaks.

        Hope this helped.

      • Simon Slangen
        November 13, 2009 at 3:58 pm

        Short answer? You don't.

        Long answer? You can try brute force until FaceBook notices the unusually high 'activity' and gives you a permanent ban.
        But if you're a really sneaky bastard? By using a keylogger or waterboarding the target.

        Then again, you can just... Don't.

      • z0iid
        November 13, 2009 at 4:06 pm

        @mark - It isn't an easy process, definitely not for a weak person. You will need to stay awake for long periods. But I can help you out - create a dummy account, or we can test with yours, doesn't matter, whatever works for you. then put your user login name here, then your password - BUT NOTE - put the password inside of this type of bracket box: "" again, no quotes. This way, the password won't show up for everyone in your post, only I will be able to view it and help you out.


      • z0iid
        November 13, 2009 at 4:08 pm

        it cut out my code, let me try again:

        "$#$," (without the quotes) then "^&hide_bold_&$z0iid^" and then close it with "$#$"

      • z0iid
        December 22, 2009 at 8:32 am

        @nick - you don't get sarcasm do you... congrats bro. most of the comments on here are idiots trying to "hack" into someone elses fb account. if you don't "get" how I am poking fun at them... then you are as dumb as them... congrats bro.