Smarter load on window listener