Youtube Better Player

Scroll wheel volume, "Are you there" popup bypass, Volume percent display, Infinite autoplay, Volume save

< Youtube Better Playerについてのフィードバック

レート:良 – スクリプトは良好に動作する

Could you please fix the script? I don't want to see these error logs.

§
投稿日: 2024/02/04
編集日: 2024/02/04

I noticed that

$('ytd-popup-container', unsafeWindow.document).inst

is used in "v0.0.1.20240203200230"

I believe inst will be removed soon. (introduced in early 2023)

The current way is polymerController (introduced in late 2023)

Also, experimental flags might be able to remove inst.

I suggest that (to prevent possible issues)

this.popupContainer.popups_[this.popupName]

change to

((this.popupContainer||0).popups_||0)[this.popupName]

and

$('ytd-popup-container', unsafeWindow.document).inst

to

const insp = o => o ? (o.polymerController || o.inst || o || 0) : (o || 0);
insp($('ytd-popup-container', unsafeWindow.document))
jeanwl作者
§
投稿日: 2024/02/04

I am sorry about these errors, do you know what specific situation triggers them?

The polymerController way seems like a much better option indeed!

Your suggestions look a bit difficult to read in my opinion; I believe these updates should be good enough?

this.popupContainer = $('ytd-popup-container', unsafeWindow.document).polymerController
const popup = this.popupContainer.popups_?.[this.popupName]

Thank you very much for the thoughtful feedback, I will update this when I hear back from you.

const insp = o => o ? (o.polymerController || o.inst || o || 0) : (o || 0);
insp($('ytd-popup-container', unsafeWindow.document))

is to fallback to make sure it works on every browser.

I think

const popup = this.popupContainer.popups_?.[this.popupName]

is acceptable if you are sure that this.popupContainer is not null.

jeanwl作者
§
投稿日: 2024/02/05

Thank you!
I updated the script.
Let me know if you keep getting these errors.

forgot to change to good.

返信を投稿

返信を投稿するにはログインしてください。