Simplify inline script code

Simplify the rendering of the inline javascript