aboutsummaryrefslogtreecommitdiffstats
path: root/src/webview/recipe.js
diff options
context:
space:
mode:
authorLibravatar Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com>2021-09-08 19:49:12 +0530
committerLibravatar GitHub <noreply@github.com>2021-09-08 19:49:12 +0530
commit1fab031b14f02037193e1b40dc92f3cf3d2d5c04 (patch)
tree2008a9165e3b651b959daff4308fe555b49a1166 /src/webview/recipe.js
parentNew translations en-US.json (#1886) (diff)
downloadferdium-app-1fab031b14f02037193e1b40dc92f3cf3d2d5c04.tar.gz
ferdium-app-1fab031b14f02037193e1b40dc92f3cf3d2d5c04.tar.zst
ferdium-app-1fab031b14f02037193e1b40dc92f3cf3d2d5c04.zip
refactor: expose some more methods for session handling on the main repo (#1887)
Diffstat (limited to 'src/webview/recipe.js')
-rw-r--r--src/webview/recipe.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/webview/recipe.js b/src/webview/recipe.js
index b2cc55ad3..a3ae4513f 100644
--- a/src/webview/recipe.js
+++ b/src/webview/recipe.js
@@ -23,6 +23,7 @@ import RecipeWebview from './lib/RecipeWebview';
23import Userscript from './lib/Userscript'; 23import Userscript from './lib/Userscript';
24 24
25import { BadgeHandler } from './badge'; 25import { BadgeHandler } from './badge';
26import { SessionHandler } from './sessionHandler';
26import contextMenu from './contextMenu'; 27import contextMenu from './contextMenu';
27import { 28import {
28 injectDarkModeStyle, 29 injectDarkModeStyle,
@@ -50,6 +51,8 @@ const debug = require('debug')('Ferdi:Plugin');
50 51
51const badgeHandler = new BadgeHandler(); 52const badgeHandler = new BadgeHandler();
52 53
54const sessionHandler = new SessionHandler();
55
53const notificationsHandler = new NotificationsHandler(); 56const notificationsHandler = new NotificationsHandler();
54 57
55// Patching window.open 58// Patching window.open
@@ -107,6 +110,10 @@ contextBridge.exposeInMainWorld('ferdi', {
107 badgeHandler.safeParseInt(text), 110 badgeHandler.safeParseInt(text),
108 displayNotification: (title, options) => 111 displayNotification: (title, options) =>
109 notificationsHandler.displayNotification(title, options), 112 notificationsHandler.displayNotification(title, options),
113 clearStorageData: (storageLocations) =>
114 sessionHandler.clearStorageData(storageLocations),
115 releaseServiceWorkers: () =>
116 sessionHandler.releaseServiceWorkers(),
110 getDisplayMediaSelector, 117 getDisplayMediaSelector,
111 getCurrentWebContents, 118 getCurrentWebContents,
112 BrowserWindow, 119 BrowserWindow,