Closed liamengland1 closed 4 years ago
Thank you very much for all the examples and the detailed explanation!! I've implemented them now.
However, re: =s0?imgmax=0
, ?imgmax=0
is required for some images:
IIRC there was also an example where =s0
wasn't needed, but I forgot to write it down.
As for =s0
, it might be unnecessary, but I also haven't find any examples where it causes issues, and it doesn't appear to affect the filename either. For now, I'd prefer to keep it, in case removing it will cause some URLs to not be sent to their maximum size (even though I doubt it, but google is pretty weird haha). If you find any URLs where it causes a problem though, please let me know!! :)
Thanks! I'll close this now :)
https://www.google.com/search?q=white+house
map img:larger:
Bug:
https://lh5.googleusercontent.com/p/AF1QipO6icCir3anUv5DaIZ_BnxDPPH68UY-MOaFsX7p=w203-h135-k-no
is correctly converted intohttps://lh5.googleusercontent.com/p/AF1QipO6icCir3anUv5DaIZ_BnxDPPH68UY-MOaFsX7p=s0?imgmax=0
But the userscript converts
https://lh6.googleusercontent.com/-mDUUR7fmn88/AAAAAAAAAAI/AAAAAAAAAAA/QPAzsKvhSI8/w60-h60-p-rp-mo-ba4-br100/photo.jpg
intohttps://lh6.googleusercontent.com/-mDUUR7fmn88/AAAAAAAAAAI/AAAAAAAAAAA/QPAzsKvhSI8/s0/photo.jpg=s0?imgmax=0
? The=s0?imgmax=0
is not needed and could cause issues. You should perhaps test if the url ends with an filetype. Another URL where this happens:https://yt3.ggpht.com/-_hLOuXOzYjo/AAAAAAAAAAI/AAAAAAAAAAA/v_Jxw0Hb3g0/s100-c-k-no/photo.jpg
Add rule:
all of these
ggpht.com/cbk
urls are currently mishandled.