Amazon Sponsored Products / Ad block

Blocks sponsored search results on amazon.com, amazon.co.uk and amazon.de and some banner ads

  1. // ==UserScript==
  2. // @name Amazon Sponsored Products / Ad block
  3. // @version 0.2
  4. // @author Michael with some help from the internet
  5. // @description Blocks sponsored search results on amazon.com, amazon.co.uk and amazon.de and some banner ads
  6. // @include *://www.amazon.de/*
  7. // @include *://www.amazon.com/*
  8. // @include *://www.amazon.co.uk/*
  9. // @require http://code.jquery.com/jquery-latest.js
  10. // @grant none
  11. // @run-at document-end
  12. // @namespace https://gf.qytechs.cn/users/163754
  13. // ==/UserScript==
  14.  
  15. $ = jQuery.noConflict(true);
  16. var pageContentchanged = false;
  17. $('body').bind("DOMSubtreeModified", function() {
  18. pageContentchanged = true;
  19. });
  20. setInterval(removeSponsoredAds, 200);
  21. console.log("amazon-sponsored-items-blocker loaded");
  22.  
  23. function removeSponsoredAds() {
  24. if (pageContentchanged) {
  25. var count = 0;
  26. $('.celwidget').each(function(i, obj) {
  27. if ($(this).find(".s-sponsored-info-icon").length > 0) {
  28. //console.log("Object " + i + " contains an ad");
  29. //$(this).css('background-color', 'red');
  30. (this).remove();
  31. count++;
  32. }
  33. });
  34. console.log("amazon-sponsored-items-blocker: " + count + " ads removed!");
  35. $(".slot__ad").hide();
  36. $(".slot__feedback").hide();
  37. $("[id*='ape_']").hide();
  38. $("[id*='sponsored']").hide();
  39. $("[id*='sp_']").hide();
  40. $("[id*='advertising']").hide();
  41. pageContentchanged = false;
  42. }
  43.  
  44. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址