X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/9634ab8fc1a2bd8bfd3a6e9c83315d31c277861c..397db07d65eec20de92f8c5220a4d41fc7d7ae7b:/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; +}