Remove redundant uses of window.*

Very simple PR, removes redundant uses of `window.*`, there's no point in doing `window.abc && window.abc()` as we already know `abc` is global when it's time to execute it.

Reject if you don't feel like touching all the different lines for "no good reason".
Well no, the next would error if `document` isn't an object (which isn't necessarily wrong though, but perhaps not our "problem" to reveal).