Forums

Infinite-Scroll
[resolved] Not compatible with HeadJS (12 posts)

  1. Ramoonus
    Member
    Posted 10 months ago #

  2. beaver6813
    Member
    Posted 10 months ago #

    I can confirm the bug but I think this is more of a headjs issue. It buffers the entire page and then inserts all the javascript files its removed, just before the closing head tag. In my mind it should also regex search for other scripts (not linked) and place those below the headjs code. Having said that, I guess it would be just as tidy to export the infinite-scroll init to a linked script.

  3. beaver6813
    Member
    Posted 10 months ago #

    Would you be able to try this test build please? It includes some major changes to the way infinite-scroll is initiated and combines the init and library effectively into one file that HeadJS loads. I've tested this out on TwentyTen and it works fine but theres still some efficiency changes I want to make before release.
    http://downloads.wordpress.org/plugin/infinite-scroll.2.0b2.110716_RC1.zip

  4. Ramoonus
    Member
    Posted 10 months ago #

    got it!

  5. beaver6813
    Member
    Posted 10 months ago #

    Any luck with the test build? Any feedback (negative is usually most helpful!)?

  6. Ramoonus
    Member
    Posted 10 months ago #

    the plugin shows up twice in the plugin list (wp-admin/plugins.php)

  7. beaver6813
    Member
    Posted 10 months ago #

    Ahh good spot, any other issues?

  8. Ramoonus
    Member
    Posted 10 months ago #

    nope
    i havent actually tested to be honest
    can I take the latest subversion version?

  9. beaver6813
    Member
    Posted 10 months ago #

    If you've got a subversion client, I've uploaded a version with a few changes to http://plugins.svn.wordpress.org/infinite-scroll/tags/2.0b2.110723_RC1/
    If not then WordPress will generate a zip at http://wordpress.org/extend/plugins/infinite-scroll/download/ for 2.0b2.110723 soon.

    Let me know how it goes!

  10. Ramoonus
    Member
    Posted 10 months ago #

    got it :)

  11. Ramoonus
    Member
    Posted 10 months ago #

    head.js("http://www.ramoonus.nl/wp-content/plugins/infinite-scroll/infinitescroll.init.js.php?p=YToyOntpOjA7YToyOntpOjA7czoyODoiaHR0cDovL3d3dy5yYW1vb251cy5ubC9wYWdlLyI7aToxO3M6MToiLyI7fWk6MTtzOjMyOiI1NDIzMjdiMjg1NDJkYjc0NTA1ZDI1MWM5YjM4MTU1MSI7fQ==")

    why is there such a long hash behind for the P var?

  12. beaver6813
    Member
    Posted 10 months ago #

    Because we're calling the script/javascript file, when it loads it doesn't know what page you've called it from. (If that makes any sense!) So the P variable contains the pathParse setting and a signature (to prevent tampering).
    I considered setting the variable before we call the file but then it causes the issues with HeadJS again, so I thought it was best to keep everything in one place.

Reply

You must log in to post.

About this Plugin

About this Topic