JSHint: use global `window`, permit `|0` type conversion