優酷全屏模式

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

發表回覆

登入以回復

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址