Based on https://adactio.com/journal/5429. View source for details.
A bit hacky, but useful if you:
Window.matchMedia()
for example, which doesn't work in IE9, even though media queries do)em
in CSS (document.documentElement.clientWidth
returns pixels)Just what MQ you're currently in when you need it, or if you're on a 'small' screen or not.
Current size: (unknown)