The img.src was something like "https://meguca.org/assets/images/src/hash.png", but the thumbnail only links to "/assets/images/src/hash.png". This was causing the call to querySelectorAll to not find anything.
Now it will construct a URL, and check for something where the end of the link matches the pathname of the URL. This "should" work even if one or the other flip between relative and absolute links.
The
img.src
was something like "https://meguca.org/assets/images/src/hash.png", but the thumbnail only links to "/assets/images/src/hash.png". This was causing the call toquerySelectorAll
to not find anything.Now it will construct a URL, and check for something where the end of the link matches the pathname of the URL. This "should" work even if one or the other flip between relative and absolute links.