Commit 4d26270e authored by jake%acutex.net's avatar jake%acutex.net

Bug 108547 - Make the JavaScript use proper DOM

Patch by Christopher Aillon <caillon@returnzero.com> r= timeless@bemail.org, kiko@async.com.br
parent aacf0de9
...@@ -160,18 +160,18 @@ ...@@ -160,18 +160,18 @@
function hideElementById(id) function hideElementById(id)
{ {
var elm = document.getElementById(id); var elm = document.getElementById(id);
if (!elm) return; if (elm) {
elm.style.display = 'none';
elm.style.setProperty('display', 'none', ''); }
} }
function showElementById(id, val) function showElementById(id, val)
{ {
var elm = document.getElementById(id); var elm = document.getElementById(id);
if (!elm) return; if (elm) {
if (!val) val = 'inline';
if (!val) val = 'inline'; elm.style.display = val;
elm.style.setProperty('display', val, ''); }
} }
function normalizeComments() function normalizeComments()
...@@ -181,15 +181,14 @@ ...@@ -181,15 +181,14 @@
var small = document.getElementById('smallCommentFrame'); var small = document.getElementById('smallCommentFrame');
var big = document.getElementById('editFrame'); var big = document.getElementById('editFrame');
if ( small.style.getProperty('display') == 'none' ) if ( small.style.display == 'none' )
{ {
small.parentNode.removeChild(small); small.parentNode.removeChild(small);
} }
if ( big.style.getProperty('display') == 'none' ) if ( big.style.display == 'none' )
{ {
big.parentNode.removeChild(big); big.parentNode.removeChild(big);
} }
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment