Advertisement
antikorps

Wallapop Ocultar Reservados

Feb 29th, 2024
725
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 0.99 KB | Source Code | 0 0
  1. // ==UserScript==
  2. // @name         ocultar productos reservados
  3. // @namespace    ocultar_productos_reservados
  4. // @version      2024-02-29
  5. // @description  Ocultar los ítems con la etiqueta de reservado en la página de Wallapop
  6. // @author       DIS MEANS WAR
  7. // @match        https://es.wallapop.com/*
  8. // @icon         https://www.google.com/s2/favicons?sz=64&domain=wallapop.com
  9. // @grant        none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13.     'use strict';
  14.  
  15.     function ocultarReservados() {
  16.         const items = document.querySelectorAll("a.ItemCardList__item")
  17.         for (const item of items) {
  18.             try {
  19.                 if (item.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0].shadowRoot.childNodes[0].classList.contains("wallapop-badge--reserved")) {
  20.                     item.remove()
  21.                 }
  22.             }
  23.             catch(error) {
  24.                 continue
  25.             }
  26.         }
  27.     }
  28.     setInterval(ocultarReservados, 2000)
  29. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement