Added hdpi detector javascript