Skip to content

Commit

Permalink
Update to manifest v3
Browse files Browse the repository at this point in the history
  • Loading branch information
shirt-dev committed Aug 4, 2024
1 parent 2d52682 commit d0e76f7
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 62 deletions.
47 changes: 0 additions & 47 deletions background.js

This file was deleted.

2 changes: 1 addition & 1 deletion cadmium-playercore-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function do_patch(desc, needle, replacement) {
the response before the body of this script finishes executing */
var request = new XMLHttpRequest();
var cadmium_url = document.getElementById("player-core-js").src;
request.open("GET", cadmium_url + "?no_filter", false); // synchronous
request.open("GET", cadmium_url, false); // synchronous
request.send();

var cadmium_src = request.responseText;
Expand Down
39 changes: 25 additions & 14 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"manifest_version": 2,
"manifest_version": 3,
"name": "Netflix International",
"description": "Displays all available Netflix audio and subtitle tracks.",
"version": "2.0.22",
"version": "2.0.23",
"author": "shirt",
"browser_action": {
"action": {
"default_icon": "img/icon128.png",
"default_popup": "pages/options.html"
},
Expand All @@ -19,7 +19,6 @@
},
"content_scripts": [{
"matches": [
"*://assets.nflxext.com/*",
"*://netflix.com/*",
"*://www.netflix.com/*"
],
Expand All @@ -28,22 +27,34 @@
"js": ["content_script.js"],
"run_at": "document_start"
}],
"background": {
"scripts": ["background.js"]
},
"options_ui": {
"page": "pages/options.html",
"open_in_tab": true
},
"web_accessible_resources": [
"cadmium-playercore-shim.js",
"netflix_max_bitrate.js",
"netflix.css"
],
"web_accessible_resources": [{
"resources": [
"cadmium-playercore-shim.js",
"netflix_max_bitrate.js",
"netflix.css"
],
"matches": [
"*://assets.nflxext.com/*",
"*://netflix.com/*",
"*://www.netflix.com/*"
]
}],
"declarative_net_request" : {
"rule_resources" : [{
"id": "1",
"enabled": true,
"path": "rules.json"
}]
},
"permissions": [
"storage",
"webRequest",
"webRequestBlocking",
"declarativeNetRequestWithHostAccess"
],
"host_permissions": [
"*://assets.nflxext.com/*",
"*://netflix.com/*",
"*://www.netflix.com/*"
Expand Down
26 changes: 26 additions & 0 deletions rules.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[
{
"id": 1,
"priority": 1,
"action": {
"type": "redirect",
"redirect": { "extensionPath": "/cadmium-playercore-shim.js" }
},
"condition": {
"urlFilter": "*://assets.nflxext.com/*/ffe/player/html/*",
"resourceTypes": ["script"]
}
},
{
"id": 2,
"priority": 1,
"action": {
"type": "redirect",
"redirect": { "extensionPath": "/cadmium-playercore-shim.js" }
},
"condition": {
"urlFilter": "*://assets.nflxext.com/player/html/ffe/*",
"resourceTypes": ["script"]
}
}
]

0 comments on commit d0e76f7

Please sign in to comment.