优酷全屏模式

YouTube画面自动转换成100高、100宽的画面。

< 脚本优酷全屏模式的反馈

评价:好评 - 脚本运行良好

§
发表于:2024-12-16
编辑于:2024-12-16

I had to fix the isTheatherMode function like this

function isTheaterMode() {
    let scrollbarWidth = window.innerWidth - document.querySelector('ytd-app')?.offsetWidth;
    let playerWidth = document.querySelector('#ytd-player')?.offsetWidth;
    let chatWidth = (!document.querySelector('ytd-live-chat-frame').attributes.collapsed && document.querySelector('ytd-live-chat-frame')?.offsetWidth) || 0;
    let isWidePlayer = scrollbarWidth + playerWidth + chatWidth === window.innerWidth;
    return (isWatchPage() && isWidePlayer);
}

by adding the check if the live chat was not collapsed

please update

ndaesik作者
§
发表于:2024-12-17

How did you collocated the YouTube chat window?
Isn't it a property added by external extension?

ndaesik作者
§
发表于:2024-12-18

by adding the check if the live chat was not collapsed

please update

You were right, I'd updated. Thanks a lot!

§
发表于:2024-12-18

<3

发表回复

登录以发表回复。