Inlining javascript works