aliyunpan-killer.js

阿里云盘视频自动最大化

  1. // ==UserScript==
  2. // @name aliyunpan-killer.js
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description 阿里云盘视频自动最大化
  6. // @author wuuconix
  7. // @match https://www.aliyundrive.com/drive/folder/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=www.aliyundrive.com
  9. // @grant none
  10. // @license MIT
  11. // ==/UserScript==
  12.  
  13. let div //视频控制栏
  14.  
  15. const observer1 = new MutationObserver(() => { //此观察者用来获得div
  16. if (document.querySelector("div.video-stage--3LCB4.cursor--w3p8T")) {
  17. div = document.querySelector("div.video-stage--3LCB4.cursor--w3p8T")
  18. console.log("成功锁定div")
  19. observer2.observe(div, { attributes: true })
  20. observer1.disconnect()
  21. }
  22. })
  23.  
  24. observer1.observe(document.body, { childList: true })
  25.  
  26. const observer2 = new MutationObserver(() => { //此观察者观察div属性的变化
  27. if (div.style.height != "100%") {
  28. div.style.height = "100%"
  29. console.log("成功将div的高度设置为100%")
  30. }
  31. })

QingJ © 2025

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