Screen masking for javascript