Hide the ad-entry element on the GreasyFork page

Hide the ad-entry element on the GreasyFork page.

目前为 2024-03-21 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name Hide the ad-entry element on the GreasyFork page
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1.3
  5. // @description Hide the ad-entry element on the GreasyFork page.
  6. // @author aspen138
  7. // @match https://greasyfork.org/*
  8. // @grant none
  9. // @icon https://greasyfork.org//vite/assets/blacklogo16-37ZGLlXh.png
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. // Add styles to hide the '.ad-entry' class elements
  17. var style = document.createElement('style');
  18. style.type = 'text/css';
  19. style.innerHTML = '.ad-entry { display: none !important; }';
  20. document.head.appendChild(style);
  21.  
  22. // Corrected: Add styles to hide elements with both '.ad' and '.ad-ea' classes
  23. var style1 = document.createElement('style');
  24. style1.type = 'text/css';
  25. style1.innerHTML = '.ad.ad-ea { display: none !important; }'; // Corrected selector
  26. document.head.appendChild(style1);
  27. })();