On Thursday, March 3, 2016 at 5:47:09 PM UTC-5, Eric Shulman wrote: > > On Thursday, March 3, 2016 at 2:39:52 PM UTC-8, Pete Wason wrote: >> >> All I want to do is load chance.js when the whole thing loads so that I >> can use some of its functions in html tiddlers. >> I tried editing the whole file and putting in <script src="chance.js" /> >> in the head section near >> >> <link id="faviconLink" rel="shortcut icon" href="favicon.ico"> >> which worked - until I had edited something and saved, and that line went >> away. >> What's the right way to do this? >> >> > Put your <script...> call into a tiddler (any name), and tag that tiddler > with $:/tags/RawMarkup > > When the document is saved, it will automatically insert the content from > tiddlers with that tag directly into the <head> of the document file, so > that the script will be invoked the next time you reload. > > As a side note, you should *never* have to hand-edit the TiddlyWiki source > file to add functionality. Most of the time, there are already hooks and > other mechanisms for adding customizations to the core code. > > enjoy, > -e > Eric Shulman > TiddlyTools / ELS Design Studios > InsideTiddlyWiki: The Missing Manuals >
Thanks, Eric. More info: The tiddler I want to use chance from is a text/html type, with a form in it which shows up in an iframe. After following your directions, the <script.. code is now in the main <head> section of the TW, and it is no longer in the <head> section of the document inside the iframe. Nothing happens when I click a form input button that calls a chance function - not even an error in the console. Further suggestions? Pete -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/tiddlywikidev. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/f83debe0-4d3a-489e-a568-73989dedae83%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
