Advertisement
Guest User

Untitled

a guest
Mar 12th, 2024
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. (function() {
  2. 'use strict';
  3.  
  4. function fix_url(){
  5. var share_url = document.getElementById("share-url");
  6. if(share_url){
  7. var url = new URL(share_url.value);
  8. url.searchParams.delete("si");
  9. share_url.value = url.toString();
  10. }
  11. }
  12.  
  13. var observer = new MutationObserver(function(mutations) {
  14. mutations.forEach(function(mutation) {
  15. if (mutation.type === "attributes" && mutation.attributeName === "aria-checked") {
  16. fix_url();
  17. }
  18. });
  19. });
  20.  
  21. observer.observe(document.body, { subtree: true, attributes: true });
  22.  
  23. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement