Google has removed two extensions in Chrome after finding out that they have violated the company's terms of service.

Users got infuriated when Amit Agrawal, a developer narrated on his website how he sold an extension to an unknown buyer, who added a code that injected invasive advertising on users.

After the Wall Street Journal contacted Google, the company immediately removed the faulty extensions -- "Tweet This Page" and Agrawal's "Add to Feedly."

"Tweet This Page," as reported by Ars Technica, had also been bought and changed to insert ads.

Unknown to some, the extensions were updated to include a code that gave out unwanted ads. It also tracks browsing activities and reports it back to its owner.

In one review, a user described "Add to Feedly" a spam that caused advertisements to pop up on any website he visited.

While the extensions are just installed on less than a hundred thousand users, it could still be pervasive. In fact, developers of other extensions admitted that they were offered money to include ad code into their extensions. Though there is nothing illegal about developers accepting money for that, they must ensure that the code they are going to ad cohere to the Google's terms of service.

In an update to its terms of service, Google now prohibits software developers from using extensions to affix an adware. Adware is a form of malware that affix advertisement in more than one page, including places where ads don't usually exist, like on Google's sparse home page.

According to Google's blog post, "Extensions are extra features and functionality that you can easily add to Google Chrome. By using extensions, you can customize Google Chrome with features you like, while keeping your browser free of things that you don't use."

Google added that extensions should bear a "single purpose," and be "narrow and easy-to-understand."