Advertisement
x7f

Untitled

x7f
Feb 13th, 2024
618
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const totallyNormalMethod = node => {
  2.   const config = { childList: true, subtree: true };
  3.  
  4.   const callback = (mutationList, observer) => {
  5.     const s = node.querySelector('[role="listbox"]>*>*');
  6.     s?.children && [...s.children].forEach(e=>parseInt(e.textContent)>2024 && e.remove())
  7.   };
  8.  
  9.   const observer = new MutationObserver(callback);
  10.  
  11.   observer.observe(node, config);
  12. }
  13.  
  14. ///////
  15.  
  16. getRootRef={totallyNormalMethod}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement