mirror of https://github.com/movim/movim
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
403 B
12 lines
403 B
/**
|
|
* @brief Open the URLs in the default browser
|
|
*/
|
|
if (typeof window.electron !== 'undefined') {
|
|
document.addEventListener('click', function(event) {
|
|
if (event.target.target == '_blank'
|
|
|| (event.target.hostname != null && event.target.hostname != BASE_HOST)) {
|
|
event.preventDefault();
|
|
window.electron.openExternal(event.target.href);
|
|
}
|
|
});
|
|
}
|