Use scrollHeight instead of offsetHeight

The original script seems not to work for my website.

After I traced the source code, I found that the offsetHeight may be replaced with scrollHeight and it works for me now.