This could be a moot point after the acid tests, but I found out something interesting about the baseball reference website. The visibility of the page is determined not by the CSS attribute "visibility" (or not only), but also by the CSS attribute "display". The distinction between them according to W3Schools is that display:none will collapse and pull up the empty space when something becomes invisible, while visibility:hidden maintains the hole. Not that we do that, but that's apparently the purpose that those two pieces of CSS would serve for designers.


So in baseball-reference.com, the CSS rule that hides everything is:
.f-i,#footer,#content,#inner_nav,#srcom display:none

So I assume that some time later, the subject-matter-related javascript file sr-min.js is supposed to set display back, but that code doesn't run I guess. But here are a few interesting lines of jdb where I confirmed that setting display makes the page render. Immediately at the time of the variable set, thanks to our cool side effects!


huh = document.querySelectorAll("#footer,#content,#inner_nav,#srcom")
[object Object],[object Object],[object Object],[object Object]

h0 = huh[0]
[object Object]
h1 = huh[1]
[object Object]
h2 = huh[2]
[object Object]
h3 = huh[3]
undefined

#never mind srcom, the first three are illustrative

h0.style.display
none
h0.style.display="block"
block
.
bye
lines 6 through 143 have been updated
jdb
h1.style.display="block"
block
.
bye
lines 144 through 1248 have been added
jdb
h2.style.display="block"
block
.
bye
lines 1249 through 1398 have been added


---

---------- Forwarded message ----------
Date: Sat, 12 May 2018 19:07:19
From: Karl Dahlke <ekl...@comcast.net>
To: ke...@carhart.net
Subject: home runs

Hmmm. Which JS file is the visibility set in?

Some sites pull in 20 js files, we're lucky this one only pulls in one.
There is a lot of js on the home page though.
But that js dynamiclly creates and runs the other script.
Run with db3 and you'll see it pull in and run the cloud script.
I've made a local version that I've been playing with, so I don't have to go to 
the internet all the time.
That cloud script has a couple of places where it sets   blah.style.visibility = 
"visible".
Look for    visibility *= *.visible
but you likely have to deminimize the script first or it's a mess.

Reply via email to