Using pure JS to determine page breakpoints