Guest User

TamperMonkey

a guest
Nov 30th, 2024
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. // ==UserScript==
  2. // @name New Userscript
  3. // @namespace http://tampermonkey.net/
  4. // @version 2024-11-30
  5. // @description try to take over the world!
  6. // @author You
  7. // @match https://www.hejto.pl/
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=hejto.pl
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. const removeNotifications = () => {
  16. const notifications = document.querySelectorAll('[class*="fixed"][class*="bottom-0"][class*="right-0"][class*="z-1200"]');
  17. notifications.forEach(notification => notification.remove());
  18. };
  19.  
  20. // Observe DOM changes to catch dynamically added notifications
  21. const observer = new MutationObserver(removeNotifications);
  22. observer.observe(document.body, { childList: true, subtree: true });
  23.  
  24. // Initial cleanup
  25. removeNotifications();
  26. })();
Advertisement
Add Comment
Please, Sign In to add comment