Easy peasy Alert box

36 views
Skip to first unread message

Charlie Veniot

unread,
Aug 13, 2022, 11:37:50 AM8/13/22
to TiddlyWiki
Follow-up to Just a goofy thought: a way to get javascript into a Tiddler

The "Hello World" alert box sample:

Download the attachment and drag into TiddlyWiki.com


The content of the "Hello World" tiddler:

```
<$vars this_html={{{ [[data:text/html,<script>alert('Hello World !!! \n\n]addsuffix[Today is ]addsuffix<now "DDD, DDth of MMM, YYYY">addsuffix[.]addsuffix[');</script>]] }}} >
<iframe srcdoc={{{ [<this_html>] }}} sandbox="allow-scripts allow-popups-to-escape-sandbox allow-same-origin allow-modals"  style="display:none;"></iframe>
</$vars>
```
Hello World.json

Charlie Veniot

unread,
Aug 13, 2022, 12:30:10 PM8/13/22
to TiddlyWiki
A ridiculously simple setup for Alert Box functionality.

Download the attached and drag into TiddlyWiki.com

This has three tiddlers:
  • Alert Box Tester
  • Alert Box Tiddler CSS
  • Alert Box Tiddler
After importing, take a look at Alert Box Tester.

Then open Alert Box Tiddler, and start playing.
SimpleAlertBoxSetup.json
Reply all
Reply to author
Forward
0 new messages