Greasy Fork 支持简体中文。

斗鱼电影页面直达及直播页面全屏

避免手动点击

// ==UserScript==
// @name 斗鱼电影页面直达及直播页面全屏
// @namespace Violentmonkey Scripts
// @description 避免手动点击
// @match https://www.douyu.com/*
// @match https://www.douyu.com/g_yqk
// @grant none
// @run-at       document-end
// @version 0.0.2
// ==/UserScript==
(
    function()
    {
        window.full_screen_clicked = false
        window.full_screen = function()
        {
            if(window.full_screen_clicked == true) return
            else if(document.querySelector('div.wfs-2a8e83') == null) setTimeout('window.full_screen()',1000)
            else
            {
                try
                {
                    document.querySelector('div.wfs-2a8e83').click()
                    document.querySelector('label.layout-Player-asidetoggleButton').click()
                    window.full_screen_clicked = true
                    document.querySelector("#js-player-video-above > div.video-above > div > div.ChargeTask-closeBg.react-draggable").className = "ChargeTask-closeBg react-draggable __web-inspector-hide-shortcut__"
                    //alert('clicked')
                }
                catch(e)
                {
                    setTimeout('window.full_screen()',1000)
                }
            }
        }
        window.click_movie = function()
        {
            if(document.querySelector("#listAll > div.layout-Module-head.ListHeader--customer > div.ListHeader-pop > ul > li:nth-child(1)") == null)
            {
                setTimeout("window.click_movie()",500);
            }
            else{
                document.querySelector("#listAll > div.layout-Module-head.ListHeader--customer > div.ListHeader-pop > ul > li:nth-child(1)").click();
            }
        }
        //alert(window.location.href)
        if(window.location.href == "https://www.douyu.com/g_yqk")
        {
            //document.querySelector('section.layout-Customize').style = 'display: none'
            setTimeout("window.click_movie()",500)
            //document.querySelector("#listAll > div.layout-Module-head.ListHeader--customer > div.ListHeader-pop > ul > li:nth-child(1)").click();
        }
        else{
            window.full_screen();
        }
    }
)
()