mirror of
https://github.com/shirt-dev/netflix-international.git
synced 2025-06-22 00:36:43 +00:00
Add preferred language option (closes #1)
This commit is contained in:
parent
5ac499f5cf
commit
a793273c04
5 changed files with 66 additions and 2 deletions
|
@ -105,6 +105,11 @@ function get_profile_list() {
|
|||
return custom_profiles;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
function get_preferred_locale() {
|
||||
return globalOptions.preferredLocale;
|
||||
}
|
||||
|
||||
do_patch(
|
||||
"Hello world",
|
||||
/(.*)/,
|
||||
|
@ -136,5 +141,17 @@ if (globalOptions.showAllTracks) {
|
|||
);
|
||||
}
|
||||
|
||||
do_patch(
|
||||
"Set preferred audio locale",
|
||||
/preferredAudioLocale:.\.preferredAudioLocale/,
|
||||
"preferredAudioLocale: get_preferred_locale()"
|
||||
);
|
||||
|
||||
do_patch(
|
||||
"Set preferred text locale",
|
||||
/preferredTextLocale:.\.preferredTextLocale/,
|
||||
"preferredTextLocale: get_preferred_locale()"
|
||||
);
|
||||
|
||||
// run our patched copy of playercore in a non-privileged context on the page
|
||||
window.Function(cadmium_src)();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue