Dec 14, 2010

inJsect – a JavaScript injection utility

Today I was fooling around on how to launch external JavaScript files in web pages. As a result a small utility called inJsect was created. Feel free to fork the code on jsfiddle (BTW great platform).

The final peace of the puzzle is a link that you can bookmark so you can run the tool from the toolbar of your browser (bookmarklet).

inJsect (drag&drop to your toolbar)

I host the code on m0sa.net so everyone can access it. You can find the expanded version of the bookmarklet code here.

inJsect can:

  • inject external JavaScript files into the remote page DOM
  • remove a script tag prior to the injection
  • execute addition JavaScript code after the external code is successfully injected

A pictures is worth a thousand words:

inJsect
Before

inJsect_after

After