Organized all the code
Updated the update notification to check periodically every 5 minutes Added in headless browser support for extensions (check the extensions repo to see an example) Added in DiscordRPC support
This commit is contained in:
12
src/preload.js
Normal file
12
src/preload.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const { contextBridge, ipcRenderer } = require('electron');
|
||||
|
||||
contextBridge.exposeInMainWorld('api', {
|
||||
|
||||
getFavorites: () => ipcRenderer.invoke('db:getFavorites'),
|
||||
addFavorite: (fav) => ipcRenderer.invoke('db:addFavorite', fav),
|
||||
removeFavorite: (id) => ipcRenderer.invoke('db:removeFavorite', id),
|
||||
|
||||
search: (source, query) => ipcRenderer.invoke('api:search', source, query),
|
||||
|
||||
getSources: () => ipcRenderer.invoke('api:getSources'),
|
||||
});
|
||||
Reference in New Issue
Block a user