octopress / littlefoot

Fancy footnote popovers with native Javascript, for any Jekyll site.
MIT License
10 stars 6 forks source link

Not working after upgrading to 1.0.1. #1

Closed jdfrens closed 9 years ago

jdfrens commented 9 years ago

I upgraded Octopress from 3.0.0 to 3.0.6, ink from 1.0.0.rc to 1.0, and littlefoot from 1.0.0 to 1.0.1. And now littlefoot doesn't work. The footnote still appears at the bottom of the post, and the reference is a link to the footnote (as if littlefoot isn't installed at all). Using my meager JavaScript skills, I was able to confirm that the event listener is added to the footnote reference.

I wiped out the various caches and the generated site itself. I confirmed that I'm loading the JavaScript and CSS in the head.

I'm happy to help debug this, but I don't know what to try next.

imathis commented 9 years ago

Sorry for your troubles! I'll take a look at this tonight.

imathis commented 9 years ago

Thanks so much for posting this! I found a fix. In an update to Octopress Ink I changed the default behavior for Javascript to be loaded asynchronously, this means that the DOMContentLoaded event may be fired before the javascript is fully downloaded. So I added a check to see if the document.readyState was "interactive", in which case I setup LittleFoot immediately.

imathis commented 9 years ago

I've just released 1.0.2 which should fix this for you. Thanks again!

jdfrens commented 9 years ago

That worked. Thanks!