🏠 

YouTube Force Link Open in New Tab (Updated)

Opens YouTube links in new tabs without simulating Ctrl+Click, keeping the original page unchanged. Also pauses video on opening.


Install this script?

Ask a question, post a review, or report the script.
Author
sun yuan
Daily installs
4
Total installs
598
Ratings
7 0 0
Version
1.3
Created
2024-08-11
Updated
2024-11-22
Size
2.33 KB
License
MIT
Applies to

主要的更改包括:
1.移除了 simulateCtrlClick 函数,因为这可能是被 YouTube 检测到的模拟行为。
2.在 handleClick 函数中,我们直接使用 window.open(anchor.href, '_blank') 来在新标签页中打开链接,而不是模拟 Ctrl+Click 事件。
3.打开视频时会自动暂停