gns3-web-ui/renderer.js

12 lines
430 B
JavaScript
Raw Normal View History

2018-01-03 15:46:15 +00:00
// This file is required by the index.html file and will
// be executed in the renderer process for that window.
// All of the Node.js APIs are available in this process.
2019-02-05 09:26:35 +00:00
let shell = require('electron').shell
document.addEventListener('click', function (event) {
if (event.target.tagName === 'A' && event.target.href.startsWith('http')) {
event.preventDefault()
shell.openExternal(event.target.href)
}
})