Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant set Youtube language back to default #2082

Closed
raszpl opened this issue Mar 8, 2024 · 2 comments · Fixed by #2076 or #2124
Closed

Cant set Youtube language back to default #2082

raszpl opened this issue Mar 8, 2024 · 2 comments · Fixed by #2076 or #2124
Assignees
Labels
Bug Bug or required update after YouTube changes

Comments

@raszpl
Copy link
Contributor

raszpl commented Mar 8, 2024

ImprovedTube.youtubeLanguage = function () {
var value = this.storage.youtube_language;
if (this.isset(value)) {
var pref = this.getCookieValueByName('PREF');
if (value !== 'default') {
var hl = this.getParam(pref, 'hl');
if (hl) {
this.setCookie('PREF', pref.replace('hl=' + hl, 'hl=' + value));
} else {
this.setCookie('PREF', pref + '&hl=' + value);
}
}
}
};

This is only able to overwrite Cookie to any value but "default", as a result when user switches this setting back to Default nothing changes. Needs a way to extract default browser language and write that to the cookie.

To reproduce

  • go to improvetube settings
  • set YT language to Korean
  • realize you dont know Korean and cant navigate YT at all :D
  • go back to improvetube settings and change back to Default

Nothing happens, you are stuck with Korean, not every user will realize you can fix language in YT menu, especially if they set weird language and cant read menu now Oh its worse. Even switching language in Youtube wont help because ImproveTube calls ImprovedTube.youtubeLanguage() on init and overrides it every single time :D

@raszpl raszpl added Bug Bug or required update after YouTube changes help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥ labels Mar 8, 2024
@raszpl raszpl self-assigned this Mar 8, 2024
@raszpl raszpl removed help wanted Just an old github standard we add automatically. (The team can remove it when working on it.) good first issue A GitHub standard for inviting (new) contributors *Congratulations in advance!* up-for-grabs (a github standard for inviting new contributors) - Welcome! ♥ labels Mar 8, 2024
@raszpl
Copy link
Contributor Author

raszpl commented Mar 9, 2024

Fixed version is not entirely right. Now setting Default deletes PREF cookie language &hl= every single time. This needs additional toggle.

@raszpl
Copy link
Contributor Author

raszpl commented Mar 25, 2024

The best would be one more option on the language list at the top called "disabled" triggering:
satus.storage.remove('youtube_language')
something like [{value: null, text: "Disabled"}]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug or required update after YouTube changes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant