Content scripts are files in JavaScript that execute in the background and refer the web pages the web browser renders. Using the DOM the content scripts can read the data of those web pages and introduce changes into them.

Two famous examples for extensions that use content scripts are the Facebook Unfriends and the Facebook Facemoods. Those two extensions change the user experience when browsing facebook.

The possibility to develop web browsers extensions that change the user experience set new business possibilities and might lead to changes in the business models as we know them today.

I am working these days on the development of a new course that focuses on google chrome extensions development. One of the topics includes a detailed coverage for the various possibilities when developing an extension that includes content scripts. The slides are already available at www.abelski.com. The following two video clips present two common approaches. The first is having the content script saved within a separated JavaScript files. The second is having the JavaScript code injected into the web page.

Leave a Reply

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