Mercurial > mozilla-the-big-picture
changeset 41:f051531224a4
fixed annoying content whitespace bug in firefox.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Fri, 11 Dec 2009 17:35:36 -0800 |
parents | 124129f5c74a |
children | 831e6516b5d2 |
files | mbp.js |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mbp.js Fri Dec 11 17:15:52 2009 -0800 +++ b/mbp.js Fri Dec 11 17:35:36 2009 -0800 @@ -58,12 +58,12 @@ function onLoaded() { $("#countdown").text(--loadsLeft); - var siblings = [this.previousSibling, - this.nextSibling]; - for (var i = 0; i < siblings.length; i++) - if (siblings[i] && - siblings[i].isElementContentWhitespace) - $(siblings[i]).remove(); + while (this.previousSibling && + this.previousSibling.isElementContentWhitespace) + $(this.previousSibling).remove(); + while (this.nextSibling && + this.nextSibling.isElementContentWhitespace) + $(this.nextSibling).remove(); var clip = $(this).css("clip"); var parts = clip.match(rectRegexp);