去掉无用文件

This commit is contained in:
gaoshuaixing
2022-01-17 19:00:40 +08:00
parent aeab23fb96
commit 291171aea7
3 changed files with 1 additions and 20 deletions

View File

@@ -38,8 +38,7 @@ const config = {
webPreferences: {
//webSecurity: false,
contextIsolation: false, // 设置此项为false后才可在渲染进程中使用electron api
nodeIntegration: true,
preload: path.join(__dirname, '../preload.js')
nodeIntegration: true
},
frame: true,
//titleBarStyle: 'hidden'

View File

@@ -1,12 +0,0 @@
// 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])
}
})

View File

@@ -1,6 +0,0 @@
// This file is required by the index.html file and will
// be executed in the renderer process for that window.
// No Node.js APIs are available in this process because
// `nodeIntegration` is turned off. Use `preload.js` to
// selectively enable features needed in the rendering
// process.