mirror of
https://gitee.com/myxzgzs/boyue_jnpf.git
synced 2025-08-08 15:22:43 +08:00
12 lines
432 B
JavaScript
12 lines
432 B
JavaScript
// All of the Node.js APIs are available in the preload process.
|
|
// It has the same sandbox as a Chrome extension.
|
|
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])
|
|
}
|
|
}) |