added proper github authentication and exposing ipc function in preload
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user