Egg Alert 2023

Send an alert when an egg is on the page

  1. // ==UserScript==
  2. // @name Egg Alert 2023
  3. // @namespace eggalert.2023
  4. // @version 1.0.1
  5. // @description Send an alert when an egg is on the page
  6. // @author Heasleys4hemp [1468764]
  7. // @match https://www.torn.com/*
  8. // @grant none
  9. // @run-at document-end
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. const eg_observer = new MutationObserver(function(mutations) {
  17. if (document.getElementById("easter-egg-hunt-root")) {
  18. eg_observer.disconnect();
  19. alert('Egg on page.');
  20. return;
  21. }
  22. });
  23. eg_observer.observe(document, {attributes: false, childList: true, characterData: false, subtree:true});
  24.  
  25. })();