Hide adblock screen on FTUApps

Hide adblock message on FTUApps

  1. // ==UserScript==
  2. // @name Hide adblock screen on FTUApps
  3. // @namespace Abiricade
  4. // @match https://ftuapps1.farlad.com/*
  5. // @grant none
  6. // @version 1.0
  7. // @author Abiricade
  8. // @description Hide adblock message on FTUApps
  9. // @license GNU GPLv3
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. function isInsideWrapper(elem) {
  16. let parent = elem.parentElement;
  17. while (parent) {
  18. if (
  19. parent.id?.toLowerCase() === 'wrapper' ||
  20. Array.from(parent.classList).some(cls => cls.toLowerCase() === 'wrapper')
  21. ) {
  22. return true;
  23. }
  24. parent = parent.parentElement;
  25. }
  26. return false;
  27. }
  28.  
  29. function hideAnnoyingDivs() {
  30. const allDivs = document.querySelectorAll('div');
  31. allDivs.forEach(div => {
  32. try {
  33. if (isInsideWrapper(div)) return; // Skip if inside wrapper
  34.  
  35. const style = window.getComputedStyle(div);
  36. const zIndex = parseInt(style.zIndex);
  37. const position = style.position;
  38.  
  39. if (
  40. div.id &&
  41. div.classList.contains(div.id) &&
  42. position === 'fixed'
  43. ) {
  44. console.log('🚫 Hiding annoying div:', div);
  45. div.style.display = 'none';
  46. }
  47. } catch (e) {
  48. console.warn('❗ Error checking div:', div, e);
  49. }
  50. });
  51. }
  52.  
  53. window.addEventListener('load', hideAnnoyingDivs);
  54. setTimeout(hideAnnoyingDivs, 2000);
  55. })();