Improvise and tidy up some javascript.

There was some messy leftover code. But the trigger button still does
not change the content.

Have to find another way.