Player FullScreen Auto

Auto Player full screen for web.

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Player FullScreen Auto
// @name:zh-CN 网页自动加载全屏宽屏播放器 - By 全栈CEO
// @namespace   https://roceys.cn
// @version      20190929
// @description Auto Player full screen for web.
// @description:zh-CN  虎牙+哔哩哔哩+Youtube直播&视频平台自动全屏宽屏播放器
// @require    https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js
// @require    https://greasyfork.org/scripts/48306-waitforkeyelements/code/waitForKeyElements.js?version=275769
// @inject-into content
// @run-at        document-idle
// @author       Roceys
// @license       Apache License
// @match        *://*.bilibili.com/*
// @match        *://www.huya.com/*
// @match        *://*.youtube.com/*
// ==/UserScript==

'use strict'

var selector = {
  'live.bilibili.com': {
    'on': "i[class='live-icon-web-fullscreen']"
  },
   'www.bilibili.com':{
      'on':"div[class~='bilibili-player-video-btn-widescreen']"
   },
  'www.huya.com': {
    'on': "span[class='player-fullpage-btn']"
  },
  'www.youtube.com': {
    'on': "button[class~='ytp-size-button']"
  }
}

var domain = document.location.hostname;

function openFullScreen() {
  var _click = document.querySelector(selector[domain].on);
  if (_click !== null) {
    _click.click();
  }
}

waitForKeyElements(selector[domain].on, openFullScreen, false);