Files
WaifuBoard/scripts/preload.js
itsskaiya 7f01bace06 Organized all script files
Removed useless things from all files
Added an update notification if there is an update
Updated the directory for the app icon
2025-11-18 13:23:50 -05:00

12 lines
443 B
JavaScript

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'),
});