Extract JS out to include file