Skip to content

Commit

Permalink
Replenish the magic 🍺
Browse files Browse the repository at this point in the history
  • Loading branch information
dannvix committed Apr 25, 2020
1 parent 9bd3db3 commit 0c6bc38
Show file tree
Hide file tree
Showing 2 changed files with 218 additions and 144 deletions.
5 changes: 0 additions & 5 deletions src/content.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
const console = require('./console');


// updated when we got `<script src...>` in the observer
let origPlayerUrl, origPlayerVersion;

window.addEventListener('load', () => {
let scriptElem = document.createElement('script');
scriptElem.setAttribute('type', 'text/javascript');
scriptElem.textContent = `(() => {
window.__originalPlayerUrl = ${JSON.stringify(origPlayerUrl)};
window.__originalPlayerVersion = ${JSON.stringify(origPlayerVersion)};
window.__nflxMultiSubsExtId = ${JSON.stringify(chrome.runtime.id)};
})();`;
document.body.appendChild(scriptElem);
Expand Down
Loading

0 comments on commit 0c6bc38

Please sign in to comment.