Quick Links

Ads are a part of life on the Internet, but when an unscrupulous extension starts purposely injecting ads into your browsing experience, then it is time to take action! Today's SuperUser Q&A post has the answer to help a frustrated reader clean up his browsing experience.

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.

Screenshot courtesy of Oliver Salzburg (SuperUser).

The Question

SuperUser reader giorgio79 wants to know how to find the Chrome extension that is injecting unwanted ads into his browsing experience:

I use Google Chrome and recently noticed random ads showing up, either embedded in web page content or by redirection. When I click on a link, an ad page opens up instead of the proper web page.

I suspect these ads are being injected by a Chrome extension, but how can I find the offending one? The ads seem to appear at random in an intermittent manner.

What is the best way for giorgio79 to find this irritating extension?

The Answer

SuperUser contributor Oliver Salzburg has the answer for us:

Depending on your JavaScript knowledge, you can inspect the scripts that can manipulate websites you visit.

1. Press F12 to open the Developer Tools. Alternatively, you can open the Developer Tools from the Hamburger Menu.

how-do-you-find-chrome-extensions-that-inject-ads-into-web-pages-01

2. On the Sources Tab, select the Content Scripts Tab. You should see a list of all the extensions that load content script.

how-do-you-find-chrome-extensions-that-inject-ads-into-web-pages-02

Content Script is the term used for scripts that are running in the context of the website you are visiting. These scripts have the ability to manipulate web content in any way they want.

3. You can now inspect those scripts and see how they are affecting the web page you are viewing.

Hint: In case they are using minified sources, enable the code beautifier.

how-do-you-find-chrome-extensions-that-inject-ads-into-web-pages-03

Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.