X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/9634ab8fc1a2bd8bfd3a6e9c83315d31c277861c..07ad4a36ea398f4bba431d19d5d99e0160ad814b:/public/javascripts/site.js diff --git a/public/javascripts/site.js b/public/javascripts/site.js index bb7439f9a..55d33d992 100644 --- a/public/javascripts/site.js +++ b/public/javascripts/site.js @@ -70,3 +70,17 @@ function setArgs(url, args) { return url.replace(/\?.*$/, "") + "?" + queryitems.join("&"); } + +function getStyle(el, property) { + var style; + + if (el.currentStyle) { + style = el.currentStyle[property]; + } else if( window.getComputedStyle ) { + style = document.defaultView.getComputedStyle(el,null).getPropertyValue(property); + } else { + style = el.style[property]; + } + + return style; +}