aboutsummaryrefslogtreecommitdiffstats
path: root/src/webview/recipe.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/webview/recipe.js')
-rw-r--r--src/webview/recipe.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/webview/recipe.js b/src/webview/recipe.js
index 32df0f756..892b08e54 100644
--- a/src/webview/recipe.js
+++ b/src/webview/recipe.js
@@ -100,7 +100,7 @@ window.open = (url, frameName, features) => {
100 } 100 }
101}; 101};
102 102
103// We can't override APIs here, so we first expose functions via window.ferdi, 103// We can't override APIs here, so we first expose functions via 'window.ferdi',
104// then overwrite the corresponding field of the window object by injected JS. 104// then overwrite the corresponding field of the window object by injected JS.
105contextBridge.exposeInMainWorld('ferdi', { 105contextBridge.exposeInMainWorld('ferdi', {
106 open: window.open, 106 open: window.open,
@@ -108,7 +108,6 @@ contextBridge.exposeInMainWorld('ferdi', {
108 safeParseInt: text => badgeHandler.safeParseInt(text), 108 safeParseInt: text => badgeHandler.safeParseInt(text),
109 displayNotification: (title, options) => 109 displayNotification: (title, options) =>
110 notificationsHandler.displayNotification(title, options), 110 notificationsHandler.displayNotification(title, options),
111 releaseServiceWorkers: () => sessionHandler.releaseServiceWorkers(),
112 getDisplayMediaSelector, 111 getDisplayMediaSelector,
113}); 112});
114 113
@@ -275,8 +274,8 @@ class RecipeController {
275 } 274 }
276 275
277 if (this.settings.app.enableSpellchecking) { 276 if (this.settings.app.enableSpellchecking) {
278 debug('Setting spellchecker language to', this.spellcheckerLanguage);
279 let { spellcheckerLanguage } = this; 277 let { spellcheckerLanguage } = this;
278 debug(`Setting spellchecker language to ${spellcheckerLanguage}`);
280 if (spellcheckerLanguage.includes('automatic')) { 279 if (spellcheckerLanguage.includes('automatic')) {
281 this.automaticLanguageDetection(); 280 this.automaticLanguageDetection();
282 debug( 281 debug(
@@ -285,7 +284,7 @@ class RecipeController {
285 ); 284 );
286 spellcheckerLanguage = this.settings.app.locale; 285 spellcheckerLanguage = this.settings.app.locale;
287 } 286 }
288 switchDict(spellcheckerLanguage); 287 switchDict(spellcheckerLanguage, this.settings.service.id);
289 } else { 288 } else {
290 debug('Disable spellchecker'); 289 debug('Disable spellchecker');
291 } 290 }
@@ -440,7 +439,7 @@ class RecipeController {
440 spellcheckerLocale, 439 spellcheckerLocale,
441 ); 440 );
442 if (spellcheckerLocale) { 441 if (spellcheckerLocale) {
443 switchDict(spellcheckerLocale); 442 switchDict(spellcheckerLocale, this.settings.service.id);
444 } 443 }
445 }, 225), 444 }, 225),
446 ); 445 );