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.

Autor
sun yuan
Denně instalací
1
Celkem instalací
643
Hodnocení
9 0 0
Verze
1.3
Vytvořeno
11. 08. 2024
Aktualizováno
22. 11. 2024
Size
2,3 KB
Licence
MIT
Spustit na

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