FA gear

FA enhancement

  1. // ==UserScript==
  2. // @name FA gear
  3. // @namespace https://greasyfork.org/en/scripts/525591-fa-gear
  4. // @version 0.11
  5. // @description FA enhancement
  6. // @author Boni
  7. // @match https://www.furaffinity.net/*
  8. // @grant none
  9. // @license GPL-3.0-or-later
  10. // @icon https://www.google.com/s2/favicons?sz=64&domain=furaffinity.net
  11. // ==/UserScript==
  12.  
  13.  
  14. (function() {
  15. 'use strict';
  16.  
  17. window.addEventListener("load", function() {
  18. document.querySelectorAll(".notifications-by-date").forEach(section => {
  19. let images = section.querySelectorAll("figure");
  20. let blockedImages = section.querySelectorAll("img.blocked-content");
  21.  
  22. if (images.length === blockedImages.length) {
  23. // Remove the entire section if all images are blocked
  24. section.remove();
  25. } else if (blockedImages.length === 1) {
  26. // Remove the single blocked image if only one is blocked
  27. blockedImages[0].closest("figure").remove();
  28. }
  29. });
  30.  
  31. document.querySelectorAll(".section-body").forEach(section => {
  32. section.querySelectorAll("figure").forEach(figure => {
  33. if (figure.querySelector("img.blocked-content")) {
  34. figure.remove();
  35. }
  36. });
  37. });
  38. });
  39. })();