// ==UserScript== // @name 斗鱼去火箭横幅 // @namespace http://tampermonkey.net/ // @version 0.2 // @description try to take over the world! // @author wah0713 // @match http*://www.douyu.com/* // @require https://cdn.bootcss.com/jquery/3.4.0/jquery.min.js // @grant none // @downloadURL none // ==/UserScript== (function () { if(/^\/\d+$/.test(window.location.pathname) !== true ) return false var sign = 0 function layoutMainReSize() { if ($(window).width() < 1366) { $('.layout-Main')[0].setAttribute('style', ` position: fixed; left: 50%; transform: translateX(-50%); width:966px!important; max-width:966px!important`) } else { console.log($('.layout-Main')[0]); $('.layout-Main')[0].setAttribute('style', ` position: fixed; left: 50%; transform: translateX(-50%); width: 1400px!important; max-width: 1400px!important;`) } } // 播发器大小及位置 $('.Background-holder').css('padding-top', 10) // $(window).on("resize", function () { // layoutMainReSize() // }) // layoutMainReSize() // 背景色 $('body').css('background-color', '#abc') // 播发器内关注按钮 $(".focus_box_con-7adc83").remove() // 右侧浮动广告 $('#js-room-activity').remove() // 底部广告 $('#js-bottom').remove() // 去掉除播放器以外的多余 $('.bc-wrapper').each((index, element) => { $(element).children().each((ind, ele) => { if ($(ele).hasClass('layout-Main')) { sign = index return false } }) }) $('.bc-wrapper').not($('.bc-wrapper')[sign]).remove() setTimeout(function () { // 抽奖中间部提示框 $('.LotteryContainer').remove() // 竞猜 $('.guessGameContainer').remove() }, 1000 * 3) setTimeout(function () { // 火箭横幅 $('.broadcastDiv-af5699').remove() // // console.log("$('.wfs-2a8e83')", $('.wfs-2a8e83')); // $('.wfs-2a8e83').on('click',function(){ // setTimeout(function(){ // console.log('$( is-fullScreenPage)',$('.is-fullScreenPage')); // if($('.is-fullScreenPage').length != 0){ // } // },200) // }) }, 1000 * 5) })()