Nico V
Nico V

Reputation: 117

Create a local script that manipulates DOM elements in website

I would like to make a script (that is ready on, or shortly after boot) that, when I surf to specific websites, it checks for certain DOM elements on the site and manipulates them.

Example: if there is a <div id="foo">Bar</div> somewhere on the page and I would like to change it to <div id="bar">Foo</div>.

How would I do this? I know I can do all this via developer tools, but I want this to be an automated process for certain sites I visit frequently.

Any help would be much appreciated.

Upvotes: 1

Views: 60

Answers (1)

Gary Payton
Gary Payton

Reputation: 36

  1. Make Chrome extensions.

  2. Make Javascript Bookmarklets.

  3. Make your own iframe. and render a page in the iframe.

Upvotes: 1

Related Questions