It seems the script tag is messing up parsing the Squiffy file for some reason.
But you don't need to use script tags - you can run JavaScript by indenting it at the top of a passage or section.
For example, here's how you display your button and bind some JavaScript to it:
$(document).on("click", "#enter-name", function () {
alert('ok...');
});
<button id="enter-name">Enter name</button>
To see this working, go here: http://docs.textadventures.co.uk/squiffy/scratchpad/?gistid=0b04d3378e7f93341e39&filename=gistfile1.txt