Skip to content

Instantly share code, notes, and snippets.

View DATADEER's full-sized avatar
💭
Be useful on the internet

Lucca Sanwald DATADEER

💭
Be useful on the internet
View GitHub Profile
const win = new electron.BrowserWindow(...)
// When work makes progress, show the progress bar
function onProgress (progress) {
// Use values 0 to 1, or -1 to hide the progress bar
win.setProgressBar(progress || -1) // Progress bar works on all platforms
}
// When work completes while the app is in the background, show a badge
var numDoneInBackground = 0