Improve pixiv thumbnails

Stop pixiv from cropping thumbnails to a square. Use higher resolution thumbnails on Retina displays.

< Feedback on Improve pixiv thumbnails

Değerlendirme: İyi - script çalışıyor

§
Gönderildi: 24.02.2020
Düzenlendi: 21.03.2020

Works now

The script does not work when using Violentmonkey on Firefox 73.0.1

kepstinSahip
§
Gönderildi: 25.02.2020

I have tested with Greasemonkey and Tampermonkey on Firefox 73.0.1 and it works with both extensions. If I get a chance I will try Violentmonkey and see what is broken there.

If you find the problem, please make a PR on the Github repository.

kepstinSahip
§
Gönderildi: 25.02.2020

Hi, I have re-tested this userscript with Violentmonkey on Firefox and everything is working as expected.

Please make sure you have the latest userscript update installed (I recommend having auto-update enabled), as I recently updated it to work with changes made on Pixiv.

If you continue to have problems, please share the version of the userscript that you have installed, the URL of a page on Pixiv that shows the issue, and a description of what you see.

§
Gönderildi: 28.02.2020

Then it must be some Linux-specific bug, since I tested the script on Linux. Just now made a new FF profile, installed Violentmonkey there, script version 20200224.1 - still every pixiv thumbnail is a square.

kepstinSahip
§
Gönderildi: 29.02.2020

That's very strange. I use Firefox on Linux as my main browser - that's what I use to develop and test this script. I'd honestly expect more issues in Chrome…

What language are you using Pixiv with? Can you provide a URL of an example page that's not working for you? If you can, please open the web inspector on an image, and check if the data-kepstin-thumbnail attribute has been added and what its value is.

The two main places where Pixiv currently uses square-cropped thumbnails that will be replaced by this userscript are:

  • The artist pages, like /users/NNN or /en/users/NNN
  • The individual image pages, like /artworks/NNN or /en/artworks/NNN

Most other pages on Pixiv still use the original aspect ratio. I've been fooled into thinking my script was broken once because I happened to open the page of an artist who only posted square images! Don't make that mistake :)

§
Gönderildi: 14.03.2020

I also tested the script on Windows - doesn't work either. Firefox v72.0.2 with Tampermonkey. It works on none of the pages so no point in providing a specific example. Language: english

I specifically checked the image dimensions - most of the images were non-square, while all thumbnails still are, all cropped.

Inspector shows: data-kepstin-thumbnail="bad" on all images in the artist's page.

kepstinSahip
§
Gönderildi: 20.03.2020
Düzenlendi: 20.03.2020

Ok, so if the data-kepstin-thumbnail="bad" attribute is set, that means that the script is running, but the image URL did not match the pattern I expect.

It's possible that pixiv is using different URLs for different people (maybe this depends on region?), which is why I can't see the problem.

In order to confirm the problem, please open an artist illustration list page like https://www.pixiv.net/en/users/1710950/artworks and inspect one of the images, and copy-paste the contents of the src= attribute.

For example, on that page, I see https://i.pximg.net/c/250x250_80_a2/img-master/img/2019/08/21/12/26/15/76377786_p0_square1200.jpg (a square image)

After my script runs, that gets replaced with https://i.pximg.net/c/240x240/img-master/img/2019/08/21/12/26/15/76377786_p0_master1200.jpg (a non-square image)

§
Gönderildi: 21.03.2020

The script is working now, finally.

Now I got the same exact src url as you just posed for the first image: https://i.pximg.net/c/250x250_80_a2/img-master/img/2019/08/21/12/26/15/76377786_p0_square1200.jpg

Unfortunately now I can't compare it to the ones which I got when the script wasn't working, I didn't think to save any

kepstinSahip
§
Gönderildi: 21.03.2020

Good to hear that it's working now!

If you ever see this problem again, please share the image URL so I can add support for it.

kepstinSahip
§
Gönderildi: 21.03.2020

To investigate further, I have looked into the certificate transparency logs for pximg.net and I found that in addition to the URLs I previously knew about, they also have used i-f.pximg.net (with the Fastly CDN).

I have adjusted this userscript with a pattern that matches the format Pixiv uses for all known CDNs.

Cevap paylaş

Yanıt göndermek için oturum açın.