Greasy Fork 还支持 简体中文。

autokf

Авто-хайд для КФ

  1. // ==UserScript==
  2. // @name autokf
  3. // @namespace autokf
  4. // @version 2.0
  5. // @description Авто-хайд для КФ
  6. // @author spark, Патруль
  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 button = document.querySelector('button.lzt-fe-se-sendMessageButton');
  17. const div = document.querySelector('div.fr-element.fr-view.fr-element-scroll-visible');
  18. if (button && div) {
  19. button.addEventListener('click', function() {
  20. const elements = [];
  21. const childElements = div.children;
  22. for (var i = 0; i < childElements.length; i++) elements.push(childElements[i].outerHTML);
  23. if(elements.length != 0) div.innerHTML = `[club=align=left]3213423423[/club]`
  24. setTimeout(function(){
  25. div.innerHTML = ``;
  26. }, 1);
  27. });
  28. }
  29. })();