Skip to content

Commit

Permalink
Update preload.js
Browse files Browse the repository at this point in the history
  • Loading branch information
vikdevelop authored Dec 14, 2021
1 parent 463d2dd commit 801944d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/preload.js
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
window.addEventListener('DOMContentLoaded', () => {
const replaceText = (selector, text) => {
const element = document.getElementById(selector)
if (element) element.innerText = text
}

for (const type of ['chrome', 'node', 'electron']) {
replaceText(`${type}-version`, process.versions[type])
}
})

0 comments on commit 801944d

Please sign in to comment.