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.
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.wp.xz.cn/plugin/infinite-scroll.2.0b2.110716_RC1.zip
Any luck with the test build? Any feedback (negative is usually most helpful!)?
the plugin shows up twice in the plugin list (wp-admin/plugins.php)
Ahh good spot, any other issues?
nope
i havent actually tested to be honest
can I take the latest subversion version?
If you’ve got a subversion client, I’ve uploaded a version with a few changes to http://plugins.svn.ww.wp.xz.cn/infinite-scroll/tags/2.0b2.110723_RC1/
If not then WordPress will generate a zip at http://ww.wp.xz.cn/extend/plugins/infinite-scroll/download/ for 2.0b2.110723 soon.
Let me know how it goes!
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.