Team:Goettingen/suplement/scripts ie ff patch
From 2013.igem.org
(Difference between revisions)
m |
|||
Line 19: | Line 19: | ||
var scrW, scrH; | var scrW, scrH; | ||
if(window.innerHeight && window.scrollMaxY) { | if(window.innerHeight && window.scrollMaxY) { | ||
- | |||
scrW = window.innerWidth + window.scrollMaxX; | scrW = window.innerWidth + window.scrollMaxX; | ||
scrH = window.innerHeight + window.scrollMaxY; | scrH = window.innerHeight + window.scrollMaxY; | ||
} else if(document.body.scrollHeight > document.body.offsetHeight){ | } else if(document.body.scrollHeight > document.body.offsetHeight){ | ||
- | |||
scrW = document.body.scrollWidth; | scrW = document.body.scrollWidth; | ||
scrH = document.body.scrollHeight; | scrH = document.body.scrollHeight; | ||
- | } else if(document.body) { | + | } else if(document.body) { |
scrW = document.body.offsetWidth; | scrW = document.body.offsetWidth; | ||
scrH = document.body.offsetHeight; | scrH = document.body.offsetHeight; | ||
Line 32: | Line 30: | ||
var winW, winH; | var winW, winH; | ||
- | if(window.innerHeight) { | + | if(window.innerHeight) { |
winW = window.innerWidth; | winW = window.innerWidth; | ||
winH = window.innerHeight; | winH = window.innerHeight; | ||
- | } else if (document.documentElement | + | } else if (document.documentElement && document.documentElement.clientHeight) { |
- | + | ||
- | + | ||
winW = document.documentElement.clientWidth; | winW = document.documentElement.clientWidth; | ||
winH = document.documentElement.clientHeight; | winH = document.documentElement.clientHeight; | ||
- | } else if (document.body) { | + | } else if (document.body) { |
winW = document.body.clientWidth; | winW = document.body.clientWidth; | ||
winH = document.body.clientHeight; | winH = document.body.clientHeight; | ||
} | } | ||
- | |||
var pageW = (scrW<winW) ? winW : scrW; | var pageW = (scrW<winW) ? winW : scrW; | ||
var pageH = (scrH<winH) ? winH : scrH; | var pageH = (scrH<winH) ? winH : scrH; |
Revision as of 18:40, 21 July 2013