Added check for exluding external js inclusion