mirror of
https://github.com/A-Star100/simpliplay-desktop.git
synced 2025-09-18 06:39:44 +00:00
14 lines
480 B
JavaScript
14 lines
480 B
JavaScript
// preload.js
|
|
|
|
// All 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 dependency of ['chrome', 'node', 'electron']) {
|
|
replaceText(`${dependency}-version`, process.versions[dependency])
|
|
}
|
|
}) |