This repository has been archived on 2025-01-09. You can view files and clone it, but cannot push or open issues or pull requests.

27 lines
754 B
JavaScript
Raw Normal View History

2025-01-09 18:30:49 +08:00
const { shell, ipcRenderer } = require("electron")
const path = require('path')
// window.onload = () => {
// // 1 获取元素
// let oBtn1 = document.getElementById('openUrl')
// let oBtn2 = document.getElementById('openFolder')
// oBtn1.addEventListener('click', (ev) => {
// ev.preventDefault()
// let urlPath = oBtn1.getAttribute('href')
// // 打开外部浏览器
// shell.openExternal(urlPath)
// })
// oBtn2.addEventListener('click', () => {
// // 打开当前目录
// shell.showItemInFolder(path.resolve(__filename))
// })
// }
ipcRenderer.on('open', () => {
let iframe = document.getElementById('webview')
iframe.src = 'https://cantyonion.site/git/'
})