网页自动加载全屏宽屏播放器 - By 全栈CEO

虎牙+哔哩哔哩+Youtube直播&视频平台自动全屏宽屏播放器

  1. // ==UserScript==
  2. // @name Player FullScreen Auto
  3. // @name:zh-CN 网页自动加载全屏宽屏播放器 - By 全栈CEO
  4. // @namespace https://roceys.cn
  5. // @version 20190929
  6. // @description Auto Player full screen for web.
  7. // @description:zh-CN 虎牙+哔哩哔哩+Youtube直播&视频平台自动全屏宽屏播放器
  8. // @require https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js
  9. // @require https://gf.qytechs.cn/scripts/48306-waitforkeyelements/code/waitForKeyElements.js?version=275769
  10. // @inject-into content
  11. // @run-at document-idle
  12. // @author Roceys
  13. // @license Apache License
  14. // @match *://*.bilibili.com/*
  15. // @match *://www.huya.com/*
  16. // @match *://*.youtube.com/*
  17. // ==/UserScript==
  18.  
  19. 'use strict'
  20.  
  21. var selector = {
  22. 'live.bilibili.com': {
  23. 'on': "i[class='live-icon-web-fullscreen']"
  24. },
  25. 'www.bilibili.com':{
  26. 'on':"div[class~='bilibili-player-video-btn-widescreen']"
  27. },
  28. 'www.huya.com': {
  29. 'on': "span[class='player-fullpage-btn']"
  30. },
  31. 'www.youtube.com': {
  32. 'on': "button[class~='ytp-size-button']"
  33. }
  34. }
  35.  
  36. var domain = document.location.hostname;
  37.  
  38. function openFullScreen() {
  39. var _click = document.querySelector(selector[domain].on);
  40. if (_click !== null) {
  41. _click.click();
  42. }
  43. }
  44.  
  45. waitForKeyElements(selector[domain].on, openFullScreen, false);

QingJ © 2025

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