虎牙直播旧版网页全屏

剧场模式时屏蔽礼物栏,并开启弹幕输入框,屏蔽右下角订阅和暂停时左下角二维码

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         虎牙直播旧版网页全屏
// @namespace    http://www.huya.com/
// @version      0.2
// @description  剧场模式时屏蔽礼物栏,并开启弹幕输入框,屏蔽右下角订阅和暂停时左下角二维码
// @author       gesla
// @match        http*://www.huya.com/*
// @grant        none
// ==/UserScript==

'use strict'
const css = `
body.mode-page-full .room-player-wrap .room-player-main #player-wrap
  {
    height: 100% !important;
    width: 100% !important;
  }

body.mode-page-full .room-player-wrap .room-player-main #player-ctrl-wrap
  {
    bottom: -60px !important;
    padding:0 !important;
  }

body.mode-page-full .room-player-wrap .room-player-main:hover #player-ctrl-wrap
  {
    bottom: 0 !important;
  }

body.mode-page-full .room-player-wrap .room-player-main #player-full-input
  {
    display:block !important;
  }

#player-subscribe-wap
{
display:none !important;
}
#player-ctrl-wrap .player-app-qrcode
{
display:none !important;
}
#huya-ab .banner-ab-warp
{
display:none !important;
}
`
let style = document.createElement('style')
style.innerHTML = css
document.querySelector('head').appendChild(style)

function timer($el,cb){
    let time=setInterval(()=>{
        if($el.length>0){
            clearInterval(time);
            $el[0].click();
            cb();
        }
    },1);
}
(function() {
      $('body').on('keydown',event=>{
          if(event.keyCode===13){
              $("#player-full-input-btn").click();
          }
      });
  }
 )();