SIGN IN SIGN UP

Auto-scroll to pick up lazy-loaded listings, raise item cap

Depop's shop grid lazy-loads more items as you scroll, so the DOM only
ever had whatever had rendered by the time the bookmarklet ran (capped
at 40). Now scrolls to the bottom repeatedly until the product-link
count stops growing for 2 checks in a row, then extracts - up to 300
items, 60 scroll iterations as a ceiling for very large shops.

Caught and fixed a real bug in the same change: the explanatory //
comments in the JS template only worked in the multi-line Python
source. The serving code collapses all newlines to spaces to fit the
script into an href attribute, which would have turned the first //
into a comment that silently swallowed every line after it - the
entire rest of the script would never have run. Removed the inline
comments (kept the explanation at the Python level) and verified the
served, single-line output has no unquoted // left before shipping.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
I
Ian Lee committed
b79af00b17747c087ca2192e380bcdb9219ffd13
Parent: b64bc72