Aternos Adblocker

Skips the 3-second cooldown triggered by adblock detection so you can access Aternos instantly.

  1. // ==UserScript==
  2. // @name Aternos Adblocker
  3. // @license MIT
  4. // @namespace https://github.com/tapetenputzer/aternos-adblock-skipper
  5. // @version 1.1
  6. // @author tapetenputzer
  7. // @description Skips the 3-second cooldown triggered by adblock detection so you can access Aternos instantly.
  8. // @match https://aternos.org/*
  9. // @match https://*.aternos.org/*
  10. // @grant none
  11. // @run-at document-start
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16.  
  17. const observer = new MutationObserver(mutations => {
  18. for (const m of mutations) {
  19. for (const node of m.addedNodes) {
  20. if (node.tagName === 'SCRIPT') {
  21. const src = node.src || '';
  22. if (src.startsWith('data:text/javascript;base64') || node.innerHTML.includes('base64')) {
  23. node.remove();
  24. }
  25. }
  26. }
  27. }
  28. });
  29. observer.observe(document, { childList: true, subtree: true });
  30.  
  31. function skipAdblock() {
  32. const bodyDiv = document.querySelector('div.body#read-our-tos');
  33. if (bodyDiv) {
  34. bodyDiv.style.removeProperty('display');
  35. bodyDiv.style.removeProperty('height');
  36. }
  37. const header = document.querySelector('header.header');
  38. if (header) {
  39. header.style.removeProperty('display');
  40. header.style.removeProperty('height');
  41. }
  42. const startBtn = document.getElementById('start');
  43. if (startBtn) {
  44. startBtn._ready = true;
  45. }
  46. document.querySelectorAll('div').forEach(div => {
  47. const s = div.getAttribute('style') || '';
  48. if (s.includes('background: #F62451')) {
  49. div.style.display = 'none';
  50. }
  51. });
  52. }
  53.  
  54. if (document.readyState === 'loading') {
  55. document.addEventListener('DOMContentLoaded', skipAdblock);
  56. } else {
  57. skipAdblock();
  58. }
  59. })();