Skip to content

Commit

Permalink
extension: tweak for duckduckgo
Browse files Browse the repository at this point in the history
  • Loading branch information
v-gb committed Sep 8, 2024
1 parent e314e2c commit bab6c01
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion extension/src/rewrite.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ async function detect_language_with_browser_api(browser, lazystr, lang) {
return { res: null, fallback: true }
}
const [str, dur] = lazystr();
if (str.length == 0) {
if (str.length == 0 || str == 'DuckDuckGo\n') {
// The initial page load on DuckDuckGo contains almost nothing, but not
// literally nothing...
return { res: null, fallback: false }
}
const { isReliable, languages } = await browser.i18n.detectLanguage(str)
Expand Down

0 comments on commit bab6c01

Please sign in to comment.