Skip to content

Commit

Permalink
Always invalidate cache for the bundled JS.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGoddessInari committed Jul 26, 2020
1 parent 06fdd47 commit fe51668
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fe51668

Please sign in to comment.