Search for raw on
tiddlywiki.com and each of the special system tags will be listed.
If you have a tiddler containing the information you want choose the appropriate tag and tag the tiddler, and it will be saved into the specific location such as in the head element. Each system tag explains where it will be stored.
I am not sure if the script will fire as you expect, but its worth a try.
As a newby, from an experienced user (not Plugin developer yet), in plain English as I understand it, TiddlyWikis automatic links and magic comes from the fact that it has its own framework. Plugin Javascript needs to comply with various standards to maintain the magic in tiddlywiki. TiddlyWiki is also structured in a way people cant inject Javascript with out the ability to save and reload the wiki which is an essential security feature.
Also;
There is a local storage plugin and also password widget in tiddlywiki. I recommend always checking if tiddlywiki has already provided a mechaisium for what ever you want to do before going off on your own, many things have being already included such that javascript is unnecessary.
Tones