next_terminal_hide_buttons.js 905 B

12345678910111213141516171819202122232425262728293031
  1. // ==UserScript==
  2. // @name Hide Specific Buttons
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description Hide specific buttons on a webpage
  6. // @author Jack
  7. // @match http://home.erhe.link:18088/*
  8. // @grant none
  9. // ==/UserScript==
  10. (function() {
  11. 'use strict';
  12. // 等待页面加载完成
  13. window.addEventListener('load', function() {
  14. // 定义要隐藏的元素选择器
  15. var selectors = [
  16. '#root > div > div:nth-child(2)',
  17. '#root > div > div:nth-child(3)',
  18. '#root > div > div:nth-child(4)'
  19. ];
  20. // 遍历选择器并隐藏对应的元素
  21. selectors.forEach(function(selector) {
  22. var element = document.querySelector(selector);
  23. if (element) {
  24. element.style.display = 'none'; // 隐藏元素
  25. }
  26. });
  27. });
  28. })();