mirror of
https://github.com/YunoHost-Apps/movim_ynh.git
synced 2024-09-03 19:46:19 +02:00
13 lines
434 B
JavaScript
13 lines
434 B
JavaScript
/**
|
|
* @brief Open the URLs in the default browser
|
|
*/
|
|
if(typeof require !== 'undefined') {
|
|
document.addEventListener('click', function(event) {
|
|
if(event.target.target == '_blank'
|
|
|| (event.target.hostname != null && event.target.hostname != BASE_HOST)) {
|
|
event.preventDefault();
|
|
var shell = require('electron').shell;
|
|
shell.openExternal(event.target.href);
|
|
}
|
|
});
|
|
}
|