Etsy - Remove Promoted Ads

Remove the promoted ads that clutter the search results on Etsy.

  1. // ==UserScript==
  2. // @name Etsy - Remove Promoted Ads
  3. // @author RandomUsername404
  4. // @namespace https://greatest.deepsurf.us/en/users/105361-randomusername404
  5. // @version 1.4
  6. // @description Remove the promoted ads that clutter the search results on Etsy.
  7. // @run-at document-start
  8. // @include https://www.etsy.com/*/search?q=*
  9. // @include https://www.etsy.com/search?q=*
  10. // @grant none
  11. // @icon https://www.etsy.com/images/favicon.ico
  12. // ==/UserScript==
  13.  
  14. var promoted = ["Publicité d'", "Anzeige des", "Ad by", "Anuncio del", "Annuncio di", "Etsy セラーによる広告", "Advertentie van", "Reklama sprzedawcy", "Anúncio de", "Реклама от"];
  15.  
  16. window.onload = function() {
  17. setInterval(function(){
  18. var elements = document.querySelectorAll('[data-ad-label]').forEach((el, i) => {
  19.  
  20. for(var count=0; count < promoted.length; count++) {
  21.  
  22. if(el.innerText.includes(promoted[count])) {
  23. var item = el.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
  24. item.parentNode.removeChild(item);
  25.  
  26. console.log("Ads removed.");
  27. }
  28. }
  29. });
  30. }, 1700);
  31. }