Skip to content

Commit

Permalink
make Netflix 1080p Firefox work again
Browse files Browse the repository at this point in the history
* updated cadmium-playercore-1080p.js and get_manifest.js from truedread/netflix-1080p
* in those files: changed references to use6Channels to window.use6Channels so it won't carsh if not defined
* background.js: instead of redirecting to the changed player core replacing the request body so there are no CORS errors
* include aes.js and sha.js in the add-on (freezing version, no web request that can potentially have CORS errors)
Probably only the changes in background.js did the trick, but
  • Loading branch information
Linux Netflix User committed Sep 8, 2019
1 parent 1ecaa5b commit 6620ca7
Show file tree
Hide file tree
Showing 6 changed files with 86,111 additions and 79,716 deletions.
803 changes: 803 additions & 0 deletions src/aes.js

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions src/background.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
browser.webRequest.onBeforeRequest.addListener(
function(details) {
return {
//redirectUrl: browser.extension.getURL("cadmium-playercore-5.0008.544.011-1080p.js")
redirectUrl: browser.extension.getURL("cadmium-playercore-1080p.js")
let filter = browser.webRequest.filterResponseData(details.requestId);
let encoder = new TextEncoder();

filter.ondata = event => {
fetch(browser.extension.getURL("cadmium-playercore-1080p.js")).
then(response => response.text()).
then(text => {
filter.write(encoder.encode(text));
filter.disconnect();
});
};
return {};
}, {
urls: [
"*://assets.nflxext.com/*/ffe/player/html/*",
Expand Down
Loading

0 comments on commit 6620ca7

Please sign in to comment.