虎牙去除全屏礼物

none

// ==UserScript==
// @name         虎牙去除全屏礼物
// @namespace     none
// @version      0.4.1
// @description  none
// @author       none
// @match        *://www.huya.com/*
// @grant        none
// ==/UserScript==

(function () {
    let css = '#player-gift-wrap{display:none !important;height:0 !important}';//底部礼物
    css += '.player-wrap{height:100% !important}';//视频播放高度修正
    css += '.player-ctrl-wrap{bottom:0px !important}';//视频播放高度修正
    //css += '#J-weekRank{display:none !important;}';//周榜
    css += '#chatRoom{height:80% !important;}';//修正评论高度
    css += '#chatRoom > div{height:100% !important;}';//修正评论高度
    css += '.msg-nobleEnter{display:none !important;height:0px !important}';//进入直播间
    css += '#system-warnTips{display:none !important;height:0px !important}';//
    css += '.tit-h-send{display:none !important;height:0px !important}';//礼物
    css += '.room-footer{display:none !important;height:0px !important}';//动态
    css += '.box-crumb{display:none !important;height:0px !important}';//某些直播间的面包屑
    //直播间图标
    css += '.jump-to-phone{display:none !important;height:0px !important}';//客户端看
    css += '.share-entrance{display:none !important;height:0px !important}';//分享
    css += '.room-gameBuy{display:none !important;height:0px !important}';//下载游戏
    css += '.illegal-report{display:none !important;height:0px !important}';//举报
    //导航栏图标
    css += '#hy-nav-download{display:none !important;height:0px !important}';//下载
    //视频
    css += '#huya-ab{display:none !important;height:0px !important}';//主播推广
    css += '.gift-info-wrap{display:none !important;height:0px !important}';//全屏后右侧礼物面板
    css += '#player-pc-watch-btn{display:none !important;height:0px !important}';//全屏后小窗按钮
    loadStyle(css);
    displayMode();
    hideTop();

    function loadStyle(css) {
        var style = document.createElement('style');
        style.type = 'text/css';
        style.rel = 'stylesheet';
        style.appendChild(document.createTextNode(css));
        var head = document.getElementsByTagName('head')[0];
        head.appendChild(style);
    }
    //鼠标移入移出显示播放器控制条
    function displayMode(){
        $("#J_playerMain").mouseover(function(){
            $(".mode-page-full #player-ctrl-wrap").show();
            $(".mode-page-full #player-wrap").css("height","100%");
            $(".mode-page-full #player-ctrl-wrap").show();
        }).mouseout(function(){
            $(".mode-page-full #player-ctrl-wrap").hide();
            $(".mode-page-full #player-wrap").css("height","100%");
            $(".mode-page-full #player-ctrl-wrap").hide();
        });
    }
    //根据直播间是否有顶部推荐图,隐藏推荐图
    function hideTop(){
        var bgBg = document.getElementById('J_spbg');
        if(bgBg!=null)
        {
            document.getElementById("J_spbg").style.display="none";
            document.getElementById("J_mainRoom").style.padding="100px 5px 0 20px";
        }
    }
})();