Hey folks, I'm currently developing an Electron app for work that manages two Chrome windows running video players, allowing me to play, pause, and sync content. This setup works flawlessly on macOS using AppleScript to directly inject JavaScript commands like `video.play()` into the browsers. However, I'm trying to replicate this functionality on Windows without using any extensions, the remote debugging port, Puppeteer, or WebDriver, since Netflix tends to flag those methods with DRM errors like M7361. I'm looking for a robust and clean solution to automatically execute JavaScript in active Chrome tabs — something that operates completely under the radar of Netflix, just like my AppleScript setup. Any ideas or suggestions on how to achieve this? Thanks in advance!
2 Answers
You might want to try injecting JavaScript directly into the address bar as a `javascript:` URI. Just hit Ctrl + L to focus the address bar, then paste your command there. It’s a straightforward method without needing any extensions.
Have you considered writing a custom browser extension? It could be the cleanest way to go about it. You can control everything within Chrome seamlessly without exposing yourself to DRM issues.
I totally agree! A custom extension could really streamline your process.