Project added to repo

This commit is contained in:
2025-07-25 14:22:48 +12:00
commit d69a44fe0d
952 changed files with 416300 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
// preload.js
const { contextBridge, ipcRenderer } = require('electron');
// Expose protected methods that allow the renderer process to use
// the ipcRenderer without exposing the entire object
contextBridge.exposeInMainWorld('electronAPI', {
onIsSteamOS: (callback) => ipcRenderer.on('is-steam-os', (_event, value) => callback(value)),
// Bookmark API
getBookmarks: () => ipcRenderer.invoke('get-bookmarks'),
addBookmark: (bookmark) => ipcRenderer.invoke('add-bookmark', bookmark),
removeBookmark: (url) => ipcRenderer.invoke('remove-bookmark', url),
// Home Bookmark API
getHomeBookmarks: () => ipcRenderer.invoke('get-home-bookmarks'),
addHomeBookmark: (bookmark) => ipcRenderer.invoke('add-home-bookmark', bookmark),
removeHomeBookmark: (url) => ipcRenderer.invoke('remove-home-bookmark', url),
});
contextBridge.exposeInMainWorld('settingsAPI', {
clearCookies: () => ipcRenderer.invoke('clear-cookies'),
goHome: () => ipcRenderer.invoke('go-home'),
clearBookmarks: () => ipcRenderer.invoke('clear-bookmarks'),
clearHomeBookmarks: () => ipcRenderer.invoke('clear-home-bookmarks'),
});