truedread / netflix-1080p

Chrome extension to play Netflix in 1080p and 5.1
MIT License
2.76k stars 303 forks source link

Convert into user script #69

Open mbc07 opened 5 years ago

mbc07 commented 5 years ago

Any chance of converting the extension into an user script, or maintaining a user script version of the extension that we can simply set up and forget on Greasemonkey/Tampermonkey? This way we can bypass whatever takedown Google/Mozilla can issue to the extension on their respective stores while retaining the auto-update function and also bypassing the annoying "This extension is not listed in the Chrome Web Store and may have been added without your knowledge." every time we open the browser...

truedread commented 3 years ago

Possibly. I'll look into it.

truedread commented 3 years ago

The extension has finally been accepted onto the Chrome Webstore again, but I'm going to keep this issue open because I think this is a neat little idea in case Google takes it down again.

DavidBuchanan314 commented 3 years ago

By the way, I've been maintaining a fork (of sorts) which uses regex to dynamically patch playercore, which avoids needing to bundle the whole of playercore with the extension. This technique may be more amenable to userscript-ification (and also, more compliant with chrome webstore policies). It also, in theory, makes the extension self-updating - although in practice, the regexes are fragile and have broken a couple of times.

https://github.com/DavidBuchanan314/Turbo-Recadmiumator

Another technique worth investigating is hooking the browser's json parse/serialise functions, to fiddle with data before/after it passes through MSL - I noticed a language-learning browser extension doing this, to enable additional subtitle/audio options. This has the advantage of not needing to patch playercore at all, and should be more robust to Netflix updates.

truedread commented 3 years ago

Very very cool ideas! I appreciate the input, and will definitely be looking into solutions like the one you have provided.

truedread commented 3 years ago

By the way, I've been maintaining a fork (of sorts) which uses regex to dynamically patch playercore, which avoids needing to bundle the whole of playercore with the extension. This technique may be more amenable to userscript-ification (and also, more compliant with chrome webstore policies). It also, in theory, makes the extension self-updating - although in practice, the regexes are fragile and have broken a couple of times.

https://github.com/DavidBuchanan314/Turbo-Recadmiumator

Another technique worth investigating is hooking the browser's json parse/serialise functions, to fiddle with data before/after it passes through MSL - I noticed a language-learning browser extension doing this, to enable additional subtitle/audio options. This has the advantage of not needing to patch playercore at all, and should be more robust to Netflix updates.

I would honestly be open to putting a solution like this (regex matching, code mod, runtime eval) into the extension, because the profile list regex matching code wouldn't change unless Netflix made a major MSL change (which they have in the past, about 2 years ago), so that seems pretty consistent. The only thing that I am worried about is the stream selector regex matching, which can change more often. I wonder if there's a better way to match that?