Semro / syncwatch

Browser extension to watch videos together
MIT License
135 stars 19 forks source link

added special treatment for Netflix #21

Closed nilshellerhoff closed 3 years ago

nilshellerhoff commented 3 years ago

Fixes #20

I had to add a second content script to inject netflix.js into the page header. This was necessary, as content scripts can't normally interact with window variables, so window.netflix was unavailable.

Tested in Chrome and Firefox.

nilshellerhoff commented 3 years ago

Nvm, doesn't reliably work with Firefox. Might PR again later

nilshellerhoff commented 3 years ago

I have now switched from CustomEvents to window.postMessage and it now also works in Firefox.

Semro commented 3 years ago

I don't have Netflix myself to test it, but those changes don't affect other websites and seems Netflix didn't work before, so I merge it.