fixing scrolldepth js and https error