This is because delivery templates don't allow ways to get these scripts in by default. So the only way I see is as you mentioned, creating a workflow and adding this code in the Script tab of the delivery activity.
Let me know if you find a workaround for this that I'm not aware of.
I tried it, but, I haven't this screen on delivery template. I have these screen on delivery-open option from Workflow, but I need that when I create the delivery from this delivery template, the delivery has embeded this script.
If I create the delivery template from a delivery which has this script, when I create a delivery on workflow with this delivery template, the delivery loses the script.