Ash Clarke

Software Engineer. User Interface Developer. Gamer. Nerd.

How to Hide Facebook Ads in Google Chrome with Stylish

After my post on hiding ads in Mozilla Firefox, I decided to do a follow up using Google Chrome. To start on the road to ad-free Facebook on Chrome, visit the web store and search for stylish.

It’s the first result, so click the “Add to Chrome” button to install.

Once installed, make your way to Facebook and click the new S icon in the Chrome toolbar. Select the “Manage Installed Styles” link.

You will be greeted by  an ugly screen that allows you to add new styles. Click the “Write new style” button to start the fun.

In the “Add New Style” screen, fill in the name field with “Facebook” or anything you like.

Fill in the “Code” field with the following:

/* Updated 16-09-2012 */
/* Hide ads on Home */
#rightCol #pagelet_ego_pane_w,
#pagelet_ads_when_no_friend_list_suggestion { display: none; }
/* Hide Right Column Footer on Home */
#rightCol #pagelet_rhc_footer { display: none; }
/* Hide ads on Timeline and Photo View */
#rightCol #pagelet_side_ads,
._24q .ego_column:not(.egoOrganicColumn) { display: none; }
/* Hide ads on Friend's Profiles */
#rightCol #pagelet_ego_pane .ego_column:not(.egoOrganicColumn),
[data-referrer*=pagelet_side_ads] { display: none; }
/* Hide ads on Comment View */
.UIStandardFrame_SidebarAds #pagelet_ego_pane .ego_column:not(.egoOrganicColumn) { display: none; }
/* Hide "People you may know" on Comment View */
.UIStandardFrame_SidebarAds #pagelet_ego_pane .egoOrganicColumn { display: none; }
/* Hide ads and sponsored stories on Message View */
#MessagingNetegoSidebar #pagelet_ego_pane .ego_column:not(.egoOrganicColumn),
#MessagingNetegoSidebar .ego_column:not(.egoOrganicColumn) { display: none; }
/* Hide ads on Lists */
#pagelet_ads_when_no_friend_list_suggestions .ego_column:not(.egoOrganicColumn) { display: none; }

Your window will look like this (You can use the resizer at the bottom-right of the field to increase the viewable area of the text field).

Before clicking save, click the “Specify” button in the “Applies to” section. Select the “URLs on the Domain” option and fill in “” (no quotes) in the field next to it. You do not have to click “Add” at this point as that adds a new rule.

Go ahead and click “Save” on the left of the screen and, after it has saved, click “Back to manage”.

You should now see your newly created style on the right.

When you visit Facebook, the ads should now be gone and a little [1] will appear on the S icon in the Chrome toolbar to show how many styles apply to the currently viewed site.

Hope this is helpful for all the Chrome users out there. If you don’t want the style to apply anymore, just click the “Disable” or “Delete” button in the “Manage installed styles” screen.

UPDATE [16/09/12]: Updated css to hide an extra case of ads showing on photo viewer.

Author: Ash Clarke

I am a user interface developer based in central Reading.