add javascript screen detection code
merge