Category Archives: Browser

Browser related blog posts

How to remove (hide) annoying sections on web pages

Every now and then it happens that there is something on a web page which I visit frequently that I don’t want to see. Things that are simply just annoying. Sure I could try to ignore it, live with it, try to convince myself it’s not worth bothering. But why should I? There are easy solutions to get rid of it.

Most people probably know Adblock Plus and many use it, myself included. It is now available for almost every modern browser, like Firefox, Google Chrome, Opera 15+, and even Internet Explorer. It is obvious what it does, it blocks ads. But it can do more, like blocking things which aren’t ads, but still annoying.

I’d like to demo how to do it with this little example: YouTube allows to post comments (unless the person publishing a video disables it), but sadly a huge amount of comments are racist, xenophobic, sexist and so on and so forth. Few comments have any value. Maybe you are the kind of person who ends up reading that stuff even though you’d rather not and you know you just end up being disgusted. So lets assume you want to get rid of it, to kill that nasty temptation.

I will show how to do this with Firefox. But I assume it will work very similarly with other browsers and their Adblock Plus addons. Don’t be scared, it should be easy enough for the average internet user, not much technical background needed.

Everything starts with a fresh Firefox 23 and the latest Adblock Plus installed:

Firefox 23 with Adblock Plus

I opened a random YouTube page with comments:

YouTube page with comments

Now comes what’s probably the most challenging part. We need to find the area which we want to remove. Therefor we right click somewhere on top of the area which should go away, like on the text “All Comments”, and select “Inspect Element” from the context menu. In the left bottom area there is an HTML view. Click on the HTML tags (the things like <…>) and see the dotted border on the web page. Try to find the HTML tag which covers the area which you want to remove, and try to find one which has an id element (id=”…”) assigned. What we want is the line

<div id="comments-view" class="" data-type="highlights" >

Here is what it looks like:

Firefox Inspect Element

The relevant information is that it is a <div> tag, and that the id element’s value is “comments-view”. If there was no id element, we could also use the class element (provided there is a value assigned), however class is more risky because unlike id values, class values don’t have to be unique (you may block more than you intend to).

So here is how to form the filter string for Adblock Plus:

  • note the domain, here: youtube.com,
  • two # signs,
  • the tag name, here: div,
  • if you picked an id element, another # sign, if you picked a class element, a dot (.),
  • the id or class value, here: comments-view

So what we have is:

youtube.com##div#comments-view

Now right click on the red Adblock Plus icon (the one which looks like a stop sign) and select “Filter Preferences”. Select the Custom Filters tab:

Adblock Plus Custom Filters

Now click “Add filter group” and name it anything you like (I named it “My filters”):

Adblock Plus Filtergroup

Click the “Actions” button and select “Show/hide filters” from the menu. Then click “Add filter” and enter the filter rule:

Adblock Plus Filter

Voilà, the comments are gone:

Final result - no more comments

Running multiple Firefox versions & profiles at the same time

Oh my freaking Flying Spaghetti Monster!

I used to think that I know Mozilla applications like Firefox and Thunderbird quite well.

Now I’m wondering, how could I miss this feature that I’ve been wishing for so long? And actually, it was very near the top of my most wanted features that I wished Mozilla would implement. Today I found out, it’s been there for many years.

It is, as the subject says, to run multiple versions of Firefox, or Thunderbird, at the same time. Especially at times like these, as Firefox 4.0 is baking and becoming increasingly suitable as a day-to-day browser, while still having a few flaws which sometimes want me to refer back to version 3.6, this may be extremely useful.

However, even if you have 2 versions of Firefox installed. As long as one version is running, and you try to start an instance of the other version by just starting Firefox the “normal way”, you get a new window of the version which is already running. But there is a solution.

And it’s very simple. It’s important to have different profiles as well (this is something that I would recommend anyway, never run different versions on the same profile – it can get pretty messed up). They are easy to create, just start Firefox (or Thunderbird) with

firefox -P


I always leave one “naked” profile which I used to call “virgin” 😉

So you need at least 2 profiles. Lets assume we have a profile “ff36” to run Firefox 3.6 on and one profile “ff40” to run Firefox 4.0 on. How to start them? Here is what it could look like (assuming we have Firefox 3.6 in /opt/firefox-3.6 and Firefox 4.0 in /opt/firefox-4.0b4):

/opt/firefox-3.6/firefox -P ff36

This is basically the standard way of starting Firefox with a specific profile. Now lets start the Firefox 4.0 instance:

/opt/firefox-4.0b4/firefox -P ff40 -no-remote

Notice the -no-remote? This is the little piece that does that trick. Without -no-remote you would have gotten just a new Firefox 3.6 window. With it, you get a nice Firefox 4.0 side by side your Firefox 3.6. And here’s what it looks like:

The same works for Thunderbird as well, and probably for most or even all XUL-based applications (SeaMonkey, Songbird, Instantbird are a few that spontaneously come to my mind).

The shocking thing to me was that it has already been introduced in Firefox 2, as the MozillaZine Knowledge Base article told me.