With the addition of those four lines (your three plus </script>) I got it working almost perfectly. The only issue now is that the list at the end includes all the pieces, along with the default moves for established ones. But at least now people can see the whole collection! I'll feel OK putting what I have onto the main page (notwithstanding the page editor's tendency to screw up these things in WYSIWIG mode).
With the addition of those four lines (your three plus
</script>
) I got it working almost perfectly. The only issue now is that the list at the end includes all the pieces, along with the default moves for established ones. But at least now people can see the whole collection! I'll feel OK putting what I have onto the main page (notwithstanding the page editor's tendency to screw up these things in WYSIWIG mode).