simplify checking for *.js