From fe51668a62eca8e4b7e97d67fb9627ec8c2bef82 Mon Sep 17 00:00:00 2001 From: TheGoddessInari Date: Sun, 26 Jul 2020 00:25:21 -0700 Subject: [PATCH] Always invalidate cache for the bundled JS. --- src/background.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/background.js b/src/background.js index 291a368..c5b9d30 100644 --- a/src/background.js +++ b/src/background.js @@ -28,9 +28,11 @@ browser.webRequest.onBeforeRequest.addListener( let encoder = new TextEncoder(); filter.onstop = event => { - fetch(browser.extension.getURL("cadmium-playercore.js")). - then(response => response.text()). - then(text => { + fetch(browser.extension.getURL("cadmium-playercore.js"), { + headers: { "cache-control": "no-cache" } + }) + .then(response => response.text()) + .then(text => { // Version 0.0024.489.050 from https://assets.nflxext.com/en_us/ffe/player/html/cadmium-playercore-0.0024.489.050.js if (text.includes(`this.version="0.0024.489.050";`)) { // Use our profile list