You can define most of the queries by:
window.$ = document.querySelectorAll.bind(document)
(https://stackoverflow.com/questions/978799/is-there-an-easy-way-to-convert-jquery-code-to-javascript)
You can get the height of the window by
const w = window,