X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fxynt%2Fxynt-commons.js;fp=web%2Fxynt%2Fxynt-commons.js;h=cb8076f7e0fe1de2a28c9c3b3f262b636abd9ade;hb=9f0cbf62feaea515635cfc85bddd5292b2170440;hp=0000000000000000000000000000000000000000;hpb=ff96d86813afe7c2d607bc6ca9d5c18c378c6fed;p=xynt.git diff --git a/web/xynt/xynt-commons.js b/web/xynt/xynt-commons.js new file mode 100644 index 0000000..cb8076f --- /dev/null +++ b/web/xynt/xynt-commons.js @@ -0,0 +1,99 @@ +function $(id) { return document.getElementById(id); } + +function getStyle(x,IEstyleProp, MozStyleProp) +{ + if (x.currentStyle) { + var y = x.currentStyle[IEstyleProp]; + } else if (window.getComputedStyle) { + var y = document.defaultView.getComputedStyle(x,null).getPropertyValue(MozStyleProp); + } + return y; +} + + /* replacement of setInterval on IE */ +(function(){ + /*if not IE, do nothing*/ + if(!document.uniqueID){return;}; + + /*Copy the default setInterval behavior*/ + var nativeSetInterval = window.setInterval; + window.setInterval = function(fn,ms) { + var param = []; + if(arguments.length <= 2) { + return nativeSetInterval(fn,ms); + } + else { + for(var i=2;i