From e5c3a680a109b2b583b9f2d5075164737e5abeff Mon Sep 17 00:00:00 2001 From: kirbylife Date: Wed, 21 Dec 2022 11:26:50 -0600 Subject: [PATCH] Add filter to Mercadolibre Argentina --- manifest.json | 12 ++++++++++-- mercadolibre-arg-detox.js | 10 ++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 mercadolibre-arg-detox.js diff --git a/manifest.json b/manifest.json index 8b38cf0..5c398dc 100644 --- a/manifest.json +++ b/manifest.json @@ -1,8 +1,8 @@ { "manifest_version": 2, "name": "dropshipping-detox", - "version": "1.0", - "description": "Oculta todos los productos de \"importación\" de MercadoLibre México y Amazon México.", + "version": "1.0.1", + "description": "Oculta todos los productos de \"importación\" de MercadoLibre México/Argentina y Amazon México.", "icons": { "48": "icons/48.png", "72": "icons/72.png", @@ -20,6 +20,14 @@ "mercadolibre-detox.js" ] }, + { + "matches": [ + "*://*.mercadolibre.com.ar/*" + ], + "js": [ + "mercadolibre-arg-detox.js" + ] + }, { "matches": [ "*://*.amazon.com.mx/*" diff --git a/mercadolibre-arg-detox.js b/mercadolibre-arg-detox.js new file mode 100644 index 0000000..c4c719b --- /dev/null +++ b/mercadolibre-arg-detox.js @@ -0,0 +1,10 @@ +setTimeout(() => { + let items = document.getElementsByClassName("ui-search-layout__item"); + for(let n = 0; n < items.length; n++) { + let item = items[n]; + let isInternational = item.innerHTML.includes("días después de tu compra"); + if(isInternational) { + item.style.display = "none"; + } + } +}, 500);