Statement scripts

Automate click-and-click statement scripts

当前为 2024-02-01 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Statement scripts
  3. // @namespace http://tampermonkey.net/
  4. // @version 2024-02-01
  5. // @description Automate click-and-click statement scripts
  6. // @author women
  7. // @match https://greasyfork.org/zh-CN/users/1255849-womenhao
  8. // @match *://*
  9. // @icon https://www.google.com/s2/favicons?sz=64&domain=greasyfork.org
  10. // @license AGPL-3.0
  11. // @grant none
  12. // ==/UserScript==
  13.  
  14. (
  15. function() {
  16. 'use strict';
  17.  
  18. let VEnable = localStorage.getItem('VEnable')=='true';
  19. if(VEnable){
  20. setTimeout(()=>{
  21. document.getElementById('live-player').remove();
  22. },3000)
  23. }
  24. let btnArea = document.querySelector('.right-ctnr');
  25. let btn = document.createElement('button');
  26. btn.textContent=VEnable?'恢复':'移除';
  27. btn.addEventListener('click',()=>{
  28. VEnable=!VEnable;
  29. localStorage.setItem('VEnable',VEnable);
  30. btn.textContent = VEnable?'恢复':'移除';
  31. if(VEnable){
  32. document.getElementById('live-player').remove();
  33. }else{
  34. location.reload();
  35. }
  36. });
  37. btnArea.insertBefore(btn,btnArea.children[0]);
  38. }
  39. )
  40.  
  41. ();