javascript: sample of generated code moved to sample extension