I'm writing a script in js to reverse copy a playlist from someone and reverse its order. The last part of it is Adding those links to my own created playlist where I find the buttons that I would have to click, map them to an object and run the click() on them. This was working for:
and
.
Problems arise on the opening of the "add videos to a playlist" pop-up box. The click() doesn't work on any button here. Or any element inside the button. I want to click on the url tab here and then a link that I have and then press the 'add button' video. I'm looking to regain the functionality of click() or do it with a simpler method.
The selector for the url button is document.querySelector("#\:6") upon running the click function on which yeilds VM5 common.js:4 Uncaught TypeError: Cannot read properties of undefined (reading 'sendMessage') at Object.sendMessage (VM5 common.js:4:101) <at HTMLDocument.<anonymous> (content.js:109:448)
I have found that forcing the hover state doesn't do anything either so maybe it has something to do with responding to a real mouse rather than js functions. Another guess is that the pop-up might have introduced a wall in front of the whole screen which is blocking the click function from working. I don't understand how I could've troubleshooted this by setting breakpoints as I don't know where to start.
