Improved Javascript Injection

I really like this method of injecting javascript, but I also like the JSEngine method that Gregor and ColinB have worked up. The latter lets me easily write and test javascript functions without having to paste and repaste into Open Link in Current Window events. Easier to port across projects, also.

I tried inserting some javascript functions in the header tags, just like you would normally with HTML and javascript, and it worked. I just added the <script> …code… </script> just before the <meta name=" Pretty cool!

So I next tried calling an external .js file in the same way, and that also worked. So for me, this is a fantastic extension of this method. Here is the basic syntax, with your original code in blue and added external .js call in red:

…;</script><script src=“http://somewhere.com/myexternal.js”></script><meta name="

1 Like