Verified Commit 1d538ad9 authored by Booteille's avatar Booteille

The interface language is now set up for all invidious pages.

parent 87e3a76c
......@@ -35,13 +35,11 @@ const invidition = async (r) => {
url.protocol = _.endsWith(url.hostname, '.onion') ? 'http' : 'https';
}
// Force language.
if (url.pathname === '/') {
if (!url.searchParams.get('hl') || url.searchParams.get('hl') !== options.hl) {
queryChanged = true;
// Set up the interface language
if (!url.searchParams.get('hl') || url.searchParams.get('hl') !== options.hl) {
queryChanged = true;
url.searchParams.set('hl', options.hl);
}
url.searchParams.set('hl', options.hl);
}
if (_.startsWith(url.pathname, '/embed') || _.startsWith(url.pathname, '/watch')) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment