Skip to content

Instantly share code, notes, and snippets.


Jan Antala janantala

Block or report user

Report or block janantala

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
janantala / getViewportSize.js
Created Mar 16, 2012 — forked from scottjehl/getViewportSize.js
Reliably get viewport dimensions in JS
View getViewportSize.js
An experiment in getting accurate visible viewport dimensions across devices
(c) 2012 Scott Jehl.
MIT/GPLv2 Licence
function viewportSize(){
var test = document.createElement( "div" ); = "position: fixed;top: 0;left: 0;bottom: 0;right: 0;";
You can’t perform that action at this time.