19 lines
307 B
JavaScript
19 lines
307 B
JavaScript
|
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,
|
||
|
};
|