Rimuovi elementi venduti da Subito.it

Rimuove dall'elenco degli oggetti cercati quelli già venduti, che è inutile mostrare perché ovviamente non possono essere acquistati. Funziona sia con la versione desktop che mobile del sito.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name     Rimuovi elementi venduti da Subito.it
// @description Rimuove dall'elenco degli oggetti cercati quelli già venduti, che è inutile mostrare perché ovviamente non possono essere acquistati. Funziona sia con la versione desktop che mobile del sito.
// @version  2.0.1
// @grant    none
// @author   StephenP
// @namespace    StephenP
// @license  AGPL-3.0
// @match    https://www.subito.it/*
// @contributionURL https://buymeacoffee.com/stephenp_greasyfork
// ==/UserScript==
setInterval(checkItems,1000);
function checkItems(){
  let sold=document.getElementsByClassName("item-sold-badge");
  if(sold){
    for(let s of sold){
      while(!s.className.includes("item-card")){
        s=s.parentNode;
      }
      s.remove();
    }
  }
}