Twitter onebox is fucking mental
-
In this post on Chrome latest, the onebox keeps ocillating between two sizes, and it's really annoying.
@ben_lubar, you've been playing with inlined stuff recently: any ideas?
Oh, and before anyone asks, I'm running no userscripts.
-
Firefox devtools are permanently highlighting this as if its value was constantly changing, but I don't notice any actual change:
...because it ellipsizes the part where the change happens.
Chrome tells me the height attribute is switching between 791px and 808px.
@ben_lubar's latest change to the site's CSS was here: https://what.thedailywtf.com/post/1168922
I'm guessing using a selector like
[style="..."]
that makes changes which make the selector no longer apply is a bad idea.
-
@RaceProUK said in Twitter onebox is fucking mental:
@ben_lubar, you've been playing with inlined stuff recently: any ideas?
Hmm...yeah, just noticed this:
@ben_lubar said in Some pictures/videos are enlarged when posted:
I have written quite possibly the worst CSS ever, but at least it works.
-
The CSS shouldn't apply at all since there's an iframe in there instead of a div.
-
@ben_lubar Key word in that sentence:
@ben_lubar said in Twitter onebox is fucking mental:
shouldn't
-
@e4tmyl33t And he's right: it shouldn't apply, and doesn't. The issue is there's some JS fuckery going on which is oscillating the height.
-
@RaceProUK said in Twitter onebox is fucking mental:
oscillating the height.permajellypotatoing the page
-
@RaceProUK said in Twitter onebox is fucking mental:
The issue is there's some JS fuckery
Isn't that the issue with the entirety of the web when you gt down to it?
-
@Jaloopa Not always. Sometimes it's CSS fuckery, sometimes it's Flash fuckery, and sometimes it's just browser fuckery.
So while fuckery is at the root, the source of said fuckery may change.
Fuckery.
I'm going to have that word stuck in my head all day now.
-
Found the rogue JS in widgets.js @ben_lubar:
t.override("matchHeightToContent", function() { var t, e = this; return c.read(function() { t = e.widgetEl ? v(e.widgetEl).height : 0 }), c.write(function() { e.sandboxEl.style.height = t + "px" }).then(function() { return e._updateCachedDimensions() }) }),