Prototyping 12 November 2012

From XPUB & Lens-Based wiki

Take back the browser!

Javascript is typically in a script tag in your own pages, but you can also use javascript in other contexts. Greasemonkey allows you to write scripts that can be installed in your browser and used to filter your browsing, by dynamically altering pages to change it appearance, content, or behaviour.

Who's Next?

Creating new content on the page...

 var newdiv = document.createElement('div');

Removing stuff is slightly indirect as you have to ask the element's "parent" to remove it's "child":

 var delme = document.getElementById("ads");

Continued on...

The Tom Cruisifier Greasemonkey script