Revert "use window.outerWidth"

This reverts commit 68a2867408391ca939312629c9a2361e1356df02.