There exists `screen.width` and `screen.height` that return the size of the display. See http://www.w3schools.com/jsref/prop_screen_width.asp . I am not sure how that behaves in multi-monitor configurations though.