lizhiweike

荔枝微课浏览器全屏

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         lizhiweike
// @namespace    https://github.com/alanwhy
// @version      0.0.1
// @description  荔枝微课浏览器全屏
// @author       wuhaoyuan
// @match        *://*.lizhiweike.com/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';


    setTimeout(()=>{
        var btn = document.createElement('div')

        btn.innerText = "浏览器内全屏"
        btn.id = 'lizhi-why'
        btn.style.position = 'fixed'
        btn.style.top = '10px'
        btn.style.left = '10px'
        btn.style.zIndex = "999999"
        btn.style.background = "#fff"
        btn.style.padding = "5px 10px"
        btn.style.borderRadius = "5px"
        btn.style.border = "1px solid #999"

        document.body.appendChild(btn)

        btn.addEventListener('mouseenter',()=>{
            btn.style.background = "#ccc"
            btn.style.cursor = "pointer"
        })

        btn.addEventListener('mouseleave',()=>{
            btn.style.background = "#fff"
        })

        btn.onclick = function(){
            document.getElementById('App').style.maxWidth = "100%"
            document.getElementsByClassName('HeaderVideo-container')[0].style.height = "100vh"
            document.getElementsByClassName('CommentInput-container')[0].style.display = "none"
            document.getElementsByClassName('FloatingWindow-box-more')[0].style.display = "none"

            btn.style.display = 'none'
        }
    },500)
})();