DaemonPoplach

Отстранение от общества клоунов

  1. // ==UserScript==
  2. // @name DaemonPoplach
  3. // @namespace DaemonZaplach
  4. // @version 2.0
  5. // @description Отстранение от общества клоунов
  6. // @author Patryl and des0late
  7. // @match https://zelenka.guru/*
  8. // @match https://lolz.guru/*
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=zelenka.guru
  10. // @grant unsafeWindow
  11. // @license Patryl
  12. // ==/UserScript==
  13.  
  14. (function() {
  15. 'use strict';
  16. const userId = [3812139];
  17. const button = document.querySelector('button.lzt-fe-se-sendMessageButton');
  18. const div = document.querySelector('div.fr-element.fr-view.fr-element-scroll-visible');
  19. if (button && div) {
  20. button.addEventListener('click', function() {
  21. const elements = [];
  22. const childElements = div.children;
  23. for (var i = 0; i < childElements.length; i++) elements.push(childElements[i].outerHTML);
  24. if(elements.length != 0) div.innerHTML = `[exceptids=${userId.join(",")}]` + elements.join("<br>") + "[/exceptids]"
  25. setTimeout(function(){
  26. div.innerHTML = ``;
  27. }, 1);
  28. });
  29. }
  30. })();