scoop viewport size for JS functions and optimize assets