metafizzy / infinite-scroll

📜 Automatically add next page
https://infinite-scroll.com
7.41k stars 1.74k forks source link

Images not loading after 2nd page #833

Closed ghost closed 5 years ago

ghost commented 6 years ago

I'm trying to inject the infinite-scroll script as a userscript on pixiv.net but something weird is happening. The infinite scroll technically works adding posts in the container without errors but images stop loading after the 2nd page for some reason. I don't know if this is an issue with infinite-scroll or pixiv but here is what I've done:

// ==UserScript==
// @name Test infinite-scroll on Bookmarks page
// @include https://www.pixiv.net/bookmark.php*
// @require https://unpkg.com/infinite-scroll@3/dist/infinite-scroll.pkgd.min.js
// ==/UserScript==

var elem = document.querySelector('div.display_editable_works ul');
var infScroll = new InfiniteScroll( elem, {
  // options
  path: 'bookmark.php?rest=show&p={{#}}',
  append: 'li.image-item',
  history: 'replace',
  hideNav: 'nav.column-order-menu',
  //debug: true,
});

Here is a screenshot of the issue (I blurred the images because there were nsfw posts in the list)

image

desandro commented 6 years ago

Is there a lazy loader running? You may have to add these images to the loader API.

hookbeak commented 6 years ago

I have a very similar issue - after the initial load - no images on any subsequent page

However this issue is only on ios browsers and Safari - all windows browsers work perfectly....

desandro commented 6 years ago

If your images have srcset then see #770

satyasaadhak commented 5 years ago

I have this same issue. And it's on windows browsers, and without srcset attribute too. The images are lazy-loaded though. Isn't there something in the plugin to fix this?