fix: display popup alertbox in hostnode view

Fix #112
pull/122/head
Raphaël Vinot 2020-11-04 16:02:05 +01:00
parent 64fff3ec7f
commit 6a4b42bafe
2 changed files with 9 additions and 3 deletions

View File

@ -63,9 +63,10 @@ function openTreeInNewTab(capture_uuid, hostnode_uuid=null) {
}
let win = window.open(url, '_blank');
if (win == null) {
alert("The browser didn't allow Lookyloo to open a new tab. There should be an icon on the right of your URL bar to allow it.");
return false;
}
win.focus();
return true;
}
function open_hostnode_popup(hostnode_uuid) {

View File

@ -42,8 +42,13 @@
});
</script>
<script>
let whereAmI = (hostnode_uuid) => window.opener.LocateNode(hostnode_uuid);
let openTreeInNewTab = (capture_uuid, hostnode_uuid=Null) => window.opener.openTreeInNewTab(capture_uuid, hostnode_uuid);
let whereAmI = (hostnode_uuid) => window.opener.LocateNode(hostnode_uuid);
let openTreeInNewTab = (capture_uuid, hostnode_uuid=Null) => {
let success = window.opener.openTreeInNewTab(capture_uuid, hostnode_uuid);
if (! success) {
alert("The browser didn't allow Lookyloo to open a new tab. There should be an icon on the right of your URL bar *in the main window* to allow it.");
}
}
</script>
<script>
$(document).ready(() => {