fileset-desktop/ipc/site.js

19 lines
307 B
JavaScript
Raw Permalink Normal View History

2022-04-05 21:26:02 +08:00
const { shell } = require("electron");
const openSite = (url, success, fail) => {
console.log("opensite");
console.log(url);
shell
.openExternal(url)
.then(() => {
if (success) success();
})
.catch((e) => {
if (fail) fail(e);
});
};
module.exports = {
openSite,
};