In 2022 ish I used to be able to close a youtube window with javascript
var openedWindow; function openWindow() { openedWindow = window.open('https://www.youtube.com/watch?v=TC1Vfoq3PvU&ab_channel=Historyboy87','_blank', 'location=yes,height=400,width=400,scrollbars=yes,status=yes');}function closeOpenedWindow() { openedWindow.close();}This no longer works. Have tried in Chrome, Firefox and Edge. It will close other websites but not youtube.