diff options
author | 2021-09-08 19:49:12 +0530 | |
---|---|---|
committer | 2021-09-08 19:49:12 +0530 | |
commit | 1fab031b14f02037193e1b40dc92f3cf3d2d5c04 (patch) | |
tree | 2008a9165e3b651b959daff4308fe555b49a1166 /src/webview/recipe.js | |
parent | New translations en-US.json (#1886) (diff) | |
download | ferdium-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.js | 7 |
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'; | |||
23 | import Userscript from './lib/Userscript'; | 23 | import Userscript from './lib/Userscript'; |
24 | 24 | ||
25 | import { BadgeHandler } from './badge'; | 25 | import { BadgeHandler } from './badge'; |
26 | import { SessionHandler } from './sessionHandler'; | ||
26 | import contextMenu from './contextMenu'; | 27 | import contextMenu from './contextMenu'; |
27 | import { | 28 | import { |
28 | injectDarkModeStyle, | 29 | injectDarkModeStyle, |
@@ -50,6 +51,8 @@ const debug = require('debug')('Ferdi:Plugin'); | |||
50 | 51 | ||
51 | const badgeHandler = new BadgeHandler(); | 52 | const badgeHandler = new BadgeHandler(); |
52 | 53 | ||
54 | const sessionHandler = new SessionHandler(); | ||
55 | |||
53 | const notificationsHandler = new NotificationsHandler(); | 56 | const 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, |