edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Kevin Carhart <kevin@carhart.net>
To: edbrowse-dev@lists.the-brannons.com
Subject: [edbrowse-dev] home runs (fwd)
Date: Sun, 20 May 2018 18:37:43 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LRH.2.03.1805201822580.26234@carhart.net> (raw)


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 <eklhad@comcast.net>
To: kevin@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	other threads:[~2018-05-21  1:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-21  1:37 Kevin Carhart [this message]
2018-05-21  2:24 ` Karl Dahlke
2018-05-21  9:50   ` Kevin Carhart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LRH.2.03.1805201822580.26234@carhart.net \
    --to=kevin@carhart.net \
    --cc=edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).