Youtube scroll lock timestamp in picture-in-picture

When using Picture-in-Picture (PiP), don't scroll to the top of the page when clicking on a timestamp that displays the time of the video.

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

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

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

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

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

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

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

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

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

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

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

作者
ziopuzzle
日安装量
0
总安装量
108
评分
1 0 1
版本
1.4
创建于
2022-09-18
更新于
2024-09-18
大小
3.3 KB
许可证
MIT
适用于

Youtube scroll lock time link in picture-in-picture

The playback time link in the comment is very useful.
However, it scrolls to the top of the page each time it is clicked.
If you are using picture-in-picture, it can be annoying to go back to the top of the page.
This user script is intended to remedy that.

🔍Feature
・When using picture-in-picture (in Chrome, you can select this option by right-clicking twice on video),
clicking chapter link or timestamp will hold the scroll position.

Note: Firefox does not seem to support the Picture-in-Picture API.
Therefore, if you are using Firefox, scrolling is disabled regardless of whether PIP is enabled or disabled.
https://bugzilla.mozilla.org/show_bug.cgi?id=1463402

🔧How to
・Install this userscript.

😀Special thanks
・q1k
Since with version 1.4, the following script is referenced (scrolling when clicking on timestamps has been completely disabled).
https://greasyfork.org/en/scripts/438943-youtube-no-scroll-to-top-on-timestamps

📃Change log
1.0 : release
1.1 : bugfix
1.2 : support https://greasyfork.org/en/scripts/444382-youtube-mini-player
But, "delay: 500" add to the IntersectionObserver options.With the Ver 1.4 update, it is no longer necessary to fix.
ex) "threshold: 0.5" -> "threshold: 0.5, delay: 500"
1.3 : fix broken script.
1.4 : scrolling when clicking on timestamps has been completely disabled.