Move script to the view?
autoload inline items