cleanup custom.js example

Cleanup `custom.js.example` use an event that is triggerd only once per session (avoid revert to checkpoint bug)