Greasy Fork镜像 支持简体中文。

docker-ui(fast os docker)调整

自动登录(不可用)、去除页头页尾

  1. // ==UserScript==
  2. // @name docker-ui(fast os docker)调整
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description 自动登录(不可用)、去除页头页尾
  6. // @author hlmio
  7. // @match http://127.0.0.1:8081/pc/
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // Your code here...
  15. // 配置变量
  16. var 用户名 = "admin"
  17. var 密码 = "888888"
  18.  
  19. // 删除主界面的页头和页尾
  20. document.querySelector("#app > section > section > header").remove()
  21. document.querySelector("#app > section > section > main > div.footer > p").remove()
  22.  
  23. // 如果是登录(不可用)页,就尝试自动登录(不可用)
  24. setTimeout(function(){
  25. let name = document.querySelector("#app > section > section > main > div.main.clearfix > div > div > div > p:nth-child(3) > input[type=text]")
  26. let pass = document.querySelector("#app > section > section > main > div.main.clearfix > div > div > div > p:nth-child(5) > input[type=password]")
  27. let login = document.querySelector("#app > section > section > main > div.main.clearfix > div > div > div > p.submit > button")
  28. if(name && pass){
  29. name.value = 用户名
  30. name.dispatchEvent(new Event('input'))
  31. pass.value = 密码
  32. pass.dispatchEvent(new Event('input'))
  33. login.click()
  34. }
  35. }, 1000);
  36.  
  37. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址