初始化

This commit is contained in:
24kycj
2025-03-30 15:47:12 +08:00
commit 6f90c7dc69
166 changed files with 85079 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
// 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])
}
})