125bt_auto

auto next and fullscreen

  1. // ==UserScript==
  2. // @name 125bt_auto
  3. // @version 0.0.1
  4. // @include http://www.125bt.com/play/*
  5. // @include http://www.125bt.com/static/player/*
  6. // @include https://youku.cdn-163.com/share/*
  7. // @include https://youku.com-youku.com/share/*
  8. // @include https://iqiyi.com-l-iqiyi.com/share/*
  9. // @include https://tudou.com-l-tudou.com/share/*
  10. // @description auto next and fullscreen
  11. // @namespace https://gf.qytechs.cn/users/164996a
  12. // ==/UserScript==
  13. const m = document.querySelector('iframe:not([id])')
  14. const c = document.querySelector('a.payactive')
  15. const f = document.querySelector('button.dplayer-full-icon')
  16. const p = document.querySelector('button.dplayer-play-icon')
  17. const v = document.querySelector('video')
  18. let l
  19. if (f && v && p) {
  20. // video dom
  21. if (v.paused) p.click()
  22. l = window.addEventListener('message', e => {
  23. if (e.data === 'fullscreen') {
  24. window.removeEventListener('message', l)
  25. f.click()
  26. }
  27. })
  28. v.addEventListener(
  29. 'ended',
  30. () => {
  31. window.top.postMessage('next')
  32. },
  33. { once: true }
  34. )
  35. } else if (m && c) {
  36. // main dom
  37. m.focus()
  38. ;(async () => {
  39. await new Promise(r => setTimeout(r, 500))
  40. m.contentWindow.postMessage('fullscreen', '*')
  41. let n = c.parentElement.nextElementSibling
  42. n = n && n.firstElementChild
  43. if (!n) return
  44. l = window.addEventListener('message', e => {
  45. if (e.data === 'next') {
  46. window.removeEventListener('message', l)
  47. n.click()
  48. }
  49. })
  50. })()
  51. }

QingJ © 2025

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