Add filename to js queue only if it's a js file