hoothin / UserScripts

Greasemonkey scripts ( Pagetual / Picviewer CE+ / DownloadAllContent ) 油猴腳本集 ユーザースクリプト集
https://greasyfork.org/users/8227-hoothin
3.03k stars 510 forks source link

Request Picviewer CE+ support for articulo.mercadolibre.com.mx #608

Open safereg opened 4 months ago

safereg commented 4 months ago

The url of site The example urls of site. Do not paste only domain without pathname.

https://articulo.mercadolibre.com.mx/MLM-2224812788

Its main idea is to change the "-F" at the end of the small image file name to "-O". I tried using a regular expression replacement rule, but couldn't achieve the desired effect.

Describe the result you'd like with the rule Find the original high-resolution image and show it, like amazon.

Custom rule you've tried { name: "amazon", url: /^https?:\/\/http2.mlstatic.com\//, lazyAttr: "data-a-hires", r: /(.+)-F.webp/, s: "$1-O.webp" }

hoothin commented 4 months ago
    {
        "name": "mercadolibre",
        "url": "^https?://articulo\\.mercadolibre\\.com\\.mx/",
        "r": "/(.+)-F\\.webp/i",
        "s": "$1-O.webp"
    }

Here is the rule.

safereg commented 4 months ago

Thank you for your reply. I tried it but this rule seems not to have taken effect. It did not create a view larger image button like Amazon's.

hoothin commented 4 months ago

Did you import the rule by clicking the rules rather than copy-pasting? And which specific image were you referring to?

safereg commented 3 months ago

Yes, I clicked on the JSON you provided and the program automatically popped up. I clicked on the confirmation button. However, on the product details page of Mercado, you can see that the original icon does not appear, but it does on Amazon. Thank you very much for your help.

Amazon

Mercado

hoothin commented 3 months ago

image

Here is the test result on my end. Make sure you've updated the script to the latest version and that the rules have been successfully imported. (You can turn on the debug switch in the settings and check the console.)