Team:Goettingen/suplement/scripts ie ff patch

From 2013.igem.org

(Difference between revisions)
m
 
(5 intermediate revisions not shown)
Line 9: Line 9:
   return retnode;
   return retnode;
};  
};  
 +
 +
if (window.scrollY == null) {window.scrollY = document.documentElement.scrollTop}
function getNextElementSibling(ob){
function getNextElementSibling(ob){
Line 16: Line 18:
}
}
-
function getPageSize() {
+
if (!getComputedStyle) {
-
  var scrW, scrH;
+
    getComputedStyle = function(el, pseudo) {
-
  if(window.innerHeight && window.scrollMaxY) {
+
        this.el = el;
-
    scrW = window.innerWidth + window.scrollMaxX;
+
        this.getPropertyValue = function(prop) {
-
    scrH = window.innerHeight + window.scrollMaxY;
+
            var re = /(\-([a-z]){1})/g;
-
  } else if(document.body.scrollHeight > document.body.offsetHeight){
+
            if (prop == 'float') prop = 'styleFloat';
-
    scrW = document.body.scrollWidth;
+
            if (re.test(prop)) {
-
    scrH = document.body.scrollHeight;
+
                prop = prop.replace(re, function () {
-
  } else if(document.body) {  
+
                    return arguments[2].toUpperCase();
-
    scrW = document.body.offsetWidth;
+
                });
-
    scrH = document.body.offsetHeight;
+
            }
-
  }
+
            return el.currentStyle[prop] ? el.currentStyle[prop] : null;
-
 
+
        }
-
  var winW, winH;
+
        return this;
-
  if(window.innerHeight) {
+
    }
-
    winW = window.innerWidth;
+
-
    winH = window.innerHeight;
+
-
  } else if (document.documentElement  && document.documentElement.clientHeight) {
+
-
    winW = document.documentElement.clientWidth;
+
-
    winH = document.documentElement.clientHeight;
+
-
  } else if (document.body) {  
+
-
    winW = document.body.clientWidth;
+
-
    winH = document.body.clientHeight;
+
-
  }
+
-
 
+
-
  var pageW = (scrW<winW) ? winW : scrW;
+
-
  var pageH = (scrH<winH) ? winH : scrH;
+
-
 
+
-
  return {PageW:pageW, PageH:pageH, WinW:winW, WinH:winH};
+
}
}
</script>
</script>
</html>
</html>

Latest revision as of 11:35, 15 September 2013