YouTube画面自动转换成100高、100宽的画面。
< 脚本优酷全屏模式的反馈
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
How did you collocated the YouTube chat window?Isn't it a property added by external extension?
by adding the check if the live chat was not collapsedplease update
You were right, I'd updated. Thanks a lot!
<3
登录以发表回复。
I had to fix the isTheatherMode function like this
by adding the check if the live chat was not collapsed
please update