mirror of
https://github.com/filecoin-project/slate.git
synced 2024-12-26 02:24:44 +03:00
13 lines
438 B
JavaScript
13 lines
438 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]);
|
|
}
|
|
});
|