1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee
epp/client-entrance-guard/preload.js

11 lines
356 B
JavaScript

window.addEventListener('DOMContentLoaded', () => {
const replaceText = (selector, text) => {
const element = document.getElementById(selector)
if (element) element.innerText = text
}
for (const dependency of ['chrome', 'node', 'electron']) {
replaceText(`${dependency}-version`, process.versions[dependency])
}
})