Coming soon -- "Show Full Post" on each Boing first post

Soon, rather than this

You’ll see a Show Full Post button

… which, when clicked, will dynamically pull in the whole post.

Thanks to the excellent @gwwar and the BBS community for inspiration. You can view it in action right now on http://discourse.codinghorror.com/category/blog

11 Likes

She’s the best, amirite? This is awesome.

1 Like

You can see this in action on new posts starting with this one:

Indeed. Helpful and collaborative wizards.

Outstanding! I love this. It allows for easier reference to the story!

This is a good add. Thanks!

hey, just a heads up, not getting the full post (i.e. the strip itself) on TTDB, and I believe I’ve noticed this on HHFT maybe.

Yes, it depends whether the Readability code can identify the content. This varies somewhat depending on the BB markup and the post itself:

How to enable Safari Reader on your site? · Mathias Bynens

It turns out Readability then loops through all these ‘paragraphs’ and assigns a score to them based on how ‘content-y’ they look. This score is determined by things like the number of commas, class names used in the markup, etc. The content’s length appears to be measured by using .innerText; for every 100 characters inside a paragraph, that paragraph’s score goes up. Eventually, the number of elements is counted, adding their individual scores. I think it’s safe to assume Safari Reader is triggered based on this algorithm.

Video-only posts may never work since there’s basically no text content to work with.

We might have better luck lobbying BB to standardize markup a bit more.

I am not sure this is the case here, its stripping the image for some crazy reason … will have a look.

EDIT

The reason we are having trouble is cause the markup structure is just real hard to deal with automatically, the image is nested in 2 divs, the algorithm is having trouble understanding that the image belongs with the post.

I will see what we can do about this general pattern.

1 Like

This topic was automatically closed after 1052 days. New replies are no longer allowed.