added proper github authentication and exposing ipc function in preload

This commit is contained in:
2023-02-06 13:21:10 +01:00
parent 5a75a90648
commit 749e8b43d5
6 changed files with 41 additions and 12 deletions

View File

@@ -1,5 +1,11 @@
// All the Node.js APIs are available in the preload process.
// It has the same sandbox as a Chrome extension.
const { contextBridge, ipcRenderer } = require('electron')
contextBridge.exposeInMainWorld('electronAPI', {
updateProgress: (callback) => ipcRenderer.on('github-lookup', callback)
})
window.addEventListener('DOMContentLoaded', () => {
const replaceText = (selector, text) => {
const element = document.getElementById(selector)