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.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/webview/recipe.js b/src/webview/recipe.js
index 7c069562f..4fcf28363 100644
--- a/src/webview/recipe.js
+++ b/src/webview/recipe.js
@@ -50,7 +50,7 @@ import {
50 50
51import { DEFAULT_APP_SETTINGS } from '../config'; 51import { DEFAULT_APP_SETTINGS } from '../config';
52 52
53const debug = require('debug')('Ferdi:Plugin'); 53const debug = require('debug')('Ferdium:Plugin');
54 54
55const badgeHandler = new BadgeHandler(); 55const badgeHandler = new BadgeHandler();
56 56
@@ -105,9 +105,9 @@ window.open = (url, frameName, features) => {
105 } 105 }
106}; 106};
107 107
108// We can't override APIs here, so we first expose functions via 'window.ferdi', 108// We can't override APIs here, so we first expose functions via 'window.ferdium',
109// then overwrite the corresponding field of the window object by injected JS. 109// then overwrite the corresponding field of the window object by injected JS.
110contextBridge.exposeInMainWorld('ferdi', { 110contextBridge.exposeInMainWorld('ferdium', {
111 open: window.open, 111 open: window.open,
112 setBadge: (direct, indirect) => badgeHandler.setBadge(direct, indirect), 112 setBadge: (direct, indirect) => badgeHandler.setBadge(direct, indirect),
113 safeParseInt: text => badgeHandler.safeParseInt(text), 113 safeParseInt: text => badgeHandler.safeParseInt(text),
@@ -119,7 +119,7 @@ contextBridge.exposeInMainWorld('ferdi', {
119 119
120ipcRenderer.sendToHost( 120ipcRenderer.sendToHost(
121 'inject-js-unsafe', 121 'inject-js-unsafe',
122 'window.open = window.ferdi.open;', 122 'window.open = window.ferdium.open;',
123 notificationsClassDefinition, 123 notificationsClassDefinition,
124 screenShareJs, 124 screenShareJs,
125); 125);