Team:Goettingen/suplement/scripts ie ff patch

From 2013.igem.org

(Difference between revisions)
Line 15: Line 15:
return ob;
return ob;
}
}
-
 
function getPageSize() {
function getPageSize() {
   var scrW, scrH;
   var scrW, scrH;
   if(window.innerHeight && window.scrollMaxY) {
   if(window.innerHeight && window.scrollMaxY) {
-
 
+
    // Mozilla
     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){
-
 
+
    // all but IE Mac
     scrW = document.body.scrollWidth;
     scrW = document.body.scrollWidth;
     scrH = document.body.scrollHeight;
     scrH = document.body.scrollHeight;
-
   } else if(document.body) {  
+
   } else if(document.body) { // IE Mac
     scrW = document.body.offsetWidth;
     scrW = document.body.offsetWidth;
     scrH = document.body.offsetHeight;
     scrH = document.body.offsetHeight;
Line 33: Line 32:
   var winW, winH;
   var winW, winH;
-
   if(window.innerHeight) {  
+
   if(window.innerHeight) { // all except IE
     winW = window.innerWidth;
     winW = window.innerWidth;
     winH = window.innerHeight;
     winH = window.innerHeight;
   } else if (document.documentElement  
   } else if (document.documentElement  
     && document.documentElement.clientHeight) {
     && document.documentElement.clientHeight) {
-
 
+
    // IE 6 Strict Mode
     winW = document.documentElement.clientWidth;  
     winW = document.documentElement.clientWidth;  
     winH = document.documentElement.clientHeight;
     winH = document.documentElement.clientHeight;
Line 46: Line 45:
   }
   }
-
 
+
  // for small pages with total size less then the viewport
   var pageW = (scrW<winW) ? winW : scrW;
   var pageW = (scrW<winW) ? winW : scrW;
   var pageH = (scrH<winH) ? winH : scrH;
   var pageH = (scrH<winH) ? winH : scrH;
Line 52: Line 51:
   return {PageW:pageW, PageH:pageH, WinW:winW, WinH:winH};
   return {PageW:pageW, PageH:pageH, WinW:winW, WinH:winH};
}
}
 +
</script>
</script>
</html>
</html>

Revision as of 18:38, 21 July 2013