mirror of
https://github.com/shirt-dev/netflix-international.git
synced 2025-08-07 00:35:50 +00:00
Compare commits
2 commits
1ff293ccf3
...
aacc5fc76f
Author | SHA1 | Date | |
---|---|---|---|
aacc5fc76f | |||
79ca463a5a |
5 changed files with 8 additions and 46 deletions
|
@ -100,27 +100,11 @@ function get_profile_list(original_profiles) {
|
|||
profiles = profiles.filter(val => !val.includes("av1-"));
|
||||
}
|
||||
|
||||
if (globalOptions.useDDPlus && MediaSource.isTypeSupported('audio/mp4; codecs="ec-3"')) {
|
||||
// Dolby Digital
|
||||
profiles = profiles.concat([
|
||||
"ddplus-2.0-dash",
|
||||
]);
|
||||
|
||||
if (globalOptions.use6Channels) {
|
||||
profiles = profiles.concat([
|
||||
"ddplus-5.1-dash",
|
||||
"ddplus-5.1hq-dash",
|
||||
"ddplus-atmos-dash",
|
||||
]);
|
||||
}
|
||||
} else {
|
||||
// No Dolby Digital
|
||||
if (globalOptions.use6Channels) {
|
||||
profiles = profiles.concat([
|
||||
"heaac-5.1-dash",
|
||||
]);
|
||||
}
|
||||
}
|
||||
if (globalOptions.use6Channels) {
|
||||
profiles = profiles.concat([
|
||||
"heaac-5.1-dash",
|
||||
]);
|
||||
}
|
||||
|
||||
profiles = [...new Set(profiles)].sort();
|
||||
return profiles;
|
||||
|
@ -145,7 +129,7 @@ do_patch(
|
|||
);
|
||||
|
||||
do_patch(
|
||||
"Re-enable Ctrl+Shift+Alt+S menu",
|
||||
"Re-enable Ctrl+Shift+Alt+B menu",
|
||||
/this\...\....\s*&&\s*this\.toggle\(\);/,
|
||||
"this.toggle();"
|
||||
);
|
||||
|
@ -169,19 +153,5 @@ do_patch(
|
|||
"preferredTextLocale: globalOptions.preferredTextLocale"
|
||||
);
|
||||
|
||||
if(globalOptions.useDDPlus && MediaSource.isTypeSupported('audio/mp4; codecs="ec-3"')) {
|
||||
do_patch(
|
||||
"Select highest audio bitrate 1",
|
||||
/(indexOf\(.\))(\?[^?]+)(\?[0-9]:)/,
|
||||
"$1)$3"
|
||||
);
|
||||
|
||||
do_patch(
|
||||
"Select highest audio bitrate 2",
|
||||
/(var\sx;if\(this\.[^\)]+)/,
|
||||
"$1 && !globalOptions.useDDPlus"
|
||||
);
|
||||
}
|
||||
|
||||
// run our patched copy of playercore in a non-privileged context on the page
|
||||
window.Function(cadmium_src)();
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"manifest_version": 2,
|
||||
"name": "Netflix International",
|
||||
"description": "Displays all available Netflix audio and subtitle tracks.",
|
||||
"version": "2.0.20",
|
||||
"version": "2.0.21",
|
||||
"author": "shirt",
|
||||
"browser_action": {
|
||||
"default_icon": "img/icon128.png",
|
||||
|
|
|
@ -26,7 +26,7 @@ let fn = function () {
|
|||
}
|
||||
|
||||
window.dispatchEvent(new KeyboardEvent('keydown', {
|
||||
keyCode: 83,
|
||||
keyCode: 66,
|
||||
ctrlKey: true,
|
||||
altKey: true,
|
||||
shiftKey: true,
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
<br>
|
||||
<input type="checkbox" id="disableHPL"><label for="disableHPL">Disable H264 HPL profile</label>
|
||||
<br>
|
||||
<input type="checkbox" id="useDDPlus"><label for="useDDPlus">Use Dolby Digital Plus (Edge)</label>
|
||||
<br>
|
||||
<label for="preferredLocale">Preferred audio language</label>
|
||||
<input list="locales" id="preferredLocale" maxlength="5">
|
||||
<br>
|
||||
|
|
|
@ -6,7 +6,6 @@ function save_options() {
|
|||
const disableVP9 = document.getElementById("disableVP9").checked;
|
||||
const disableAV1 = document.getElementById("disableAV1").checked;
|
||||
const disableHPL = document.getElementById("disableHPL").checked;
|
||||
const useDDPlus = document.getElementById("useDDPlus").checked;
|
||||
const preferredLocale = document.getElementById("preferredLocale").value;
|
||||
const preferredTextLocale = document.getElementById("preferredTextLocale").value;
|
||||
|
||||
|
@ -17,7 +16,6 @@ function save_options() {
|
|||
disableVP9: disableVP9,
|
||||
disableAV1: disableAV1,
|
||||
disableHPL: disableHPL,
|
||||
useDDPlus: useDDPlus,
|
||||
preferredLocale: preferredLocale,
|
||||
preferredTextLocale: preferredTextLocale,
|
||||
}, function() {
|
||||
|
@ -36,7 +34,6 @@ function reset_options() {
|
|||
document.getElementById("disableVP9").checked = false;
|
||||
document.getElementById("disableAV1").checked = true;
|
||||
document.getElementById("disableHPL").checked = false;
|
||||
document.getElementById("useDDPlus").checked = false;
|
||||
document.getElementById("preferredLocale").value = null;
|
||||
document.getElementById("preferredTextLocale").value = null;
|
||||
|
||||
|
@ -47,7 +44,6 @@ function reset_options() {
|
|||
disableVP9: false,
|
||||
disableAV1: true,
|
||||
disableHPL: false,
|
||||
useDDPlus: false,
|
||||
preferredLocale: null,
|
||||
preferredTextLocale: null,
|
||||
}, function() {
|
||||
|
@ -67,7 +63,6 @@ function restore_options() {
|
|||
disableVP9: false,
|
||||
disableAV1: true,
|
||||
disableHPL: false,
|
||||
useDDPlus: false,
|
||||
preferredLocale: null,
|
||||
preferredTextLocale: null,
|
||||
}, function(items) {
|
||||
|
@ -77,7 +72,6 @@ function restore_options() {
|
|||
document.getElementById("disableVP9").checked = items.disableVP9;
|
||||
document.getElementById("disableAV1").checked = items.disableAV1;
|
||||
document.getElementById("disableHPL").checked = items.disableHPL;
|
||||
document.getElementById("useDDPlus").checked = items.useDDPlus;
|
||||
document.getElementById("preferredLocale").value = items.preferredLocale;
|
||||
document.getElementById("preferredTextLocale").value = items.preferredTextLocale;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue