Guest User

Hide locked notification bar on Suno (Tampermonkey script for Chrome)

a guest
Aug 2nd, 2025
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Suno - Hide persistent notifications bar
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.3
  5. // @description Hide the locked notification bar on suno.com
  6. // @author Kinburril
  7. // @match https://suno.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. const selector = 'div.inset-0.overflow-y-auto.transition-transform'; // precise selector
  15.  
  16. function removeBar(node) {
  17. if (node && node.matches && node.matches(selector)) {
  18. node.remove(); // removes the bar completely
  19. console.log(':white_check_mark: Notification bar removed.');
  20. return true;
  21. }
  22. return false;
  23. }
  24.  
  25. // Initial check if it is already present
  26. document.querySelectorAll(selector).forEach(el => removeBar(el));
  27.  
  28. // Observe changes in DOM (for React dynamic loading)
  29. const observer = new MutationObserver(mutations => {
  30. for (let mutation of mutations) {
  31. for (let node of mutation.addedNodes) {
  32. if (removeBar(node)) return;
  33. if (node.querySelectorAll) {
  34. node.querySelectorAll(selector).forEach(el => removeBar(el));
  35. }
  36. }
  37. }
  38. });
  39.  
  40. observer.observe(document.body, { childList: true, subtree: true });
  41. })();
  42.  
Advertisement
Add Comment
Please, Sign In to add comment