Skip the ad and go straight to the content

Why? Just tell me why?

It seems AngularJS News and AngularJS Jobs, quite prominent in the AngularJS community in Twitter, are getting away with wrapping external content with their own ads, thanks to LinkPlug and Brian Petro.

Before it gets too late let’s see how we can easily opt out, if you decide to do so.

You will only need 2 minutes and you will learn about using user scripts as a bonus.

Step 1: Install a userscript manager

Depending on your browser of preference you can use:

I am going to use Chrome in this case but you can Google how to do it for other browsers. This browser extension will allow us to inject our JavaScript code into the page when using some specific domains. For our purposes these will be:

You can easily customise these settings to match other urls. See the @match setting on the next step.

Step 2: Create a user script to navigate to the content

Let’s take one sample url. This is how it looks

Create a new script and copy and paste this code below

First of all, 0ur code breaks any markup preceding it (line 11). After that, we immediately redirect the page straight to the content using the hash bit of the url, taking everything after ‘#’ (line 12).

The script has access to anything on the page so any other hacks are possible if the content url is ever moved somewhere else.

That’s all. This should do it for now. Enjoy it till it lasts!

Update

Robots… you may regret using them later on.