YTDecoderPlus
+1
-1
| { | ||
| "name": "YTDecoderPlus", | ||
| "version": "2.5.2", | ||
| "version": "2.5.3", | ||
| "manifest_version": 3, | ||
@@ -5,0 +5,0 @@ "description": "__MSG_extensionDescription__", |
@@ -156,10 +156,19 @@ /** | ||
| fetch(ENGINE_URL) | ||
| .then(function (r) { return r.text(); }) | ||
| .then(function (text) { | ||
| const s = document.createElement('script'); | ||
| s.textContent = text; | ||
| (document.head || document.documentElement).appendChild(s); | ||
| }) | ||
| .catch(function () { /* the src injection covers this */ }); | ||
| // Chrome blocks inline scripts injected from content scripts (strict CSP), | ||
| // but its src-based injection below works everywhere thanks to | ||
| // web_accessible_resources. Firefox allows both routes, so it keeps the | ||
| // inline fallback to stay bug-compatible with older releases. | ||
| const SUPPORTS_INLINE_INJECT = typeof browser !== 'undefined' && | ||
| typeof browser.runtime.getBrowserInfo === 'function'; | ||
| if (SUPPORTS_INLINE_INJECT) { | ||
| fetch(ENGINE_URL) | ||
| .then(function (r) { return r.text(); }) | ||
| .then(function (text) { | ||
| const s = document.createElement('script'); | ||
| s.textContent = text; | ||
| (document.head || document.documentElement).appendChild(s); | ||
| }) | ||
| .catch(function () { /* the src injection covers this */ }); | ||
| } | ||
| injectEngineSrc(); | ||
@@ -166,0 +175,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet