mirror of https://github.com/CIRCL/lookyloo
fix: Properly highlight node across captures
parent
db8e79677e
commit
55d08e7675
|
@ -78,8 +78,12 @@ function collapse(d) {
|
|||
}
|
||||
};
|
||||
|
||||
function openTreeInNewTab(treeUUID) {
|
||||
var win = window.open('/tree/' + treeUUID, '_blank');
|
||||
function openTreeInNewTab(capture_uuid, hostnode_uuid=null) {
|
||||
var url = '/tree/' + capture_uuid;
|
||||
if (hostnode_uuid) {
|
||||
url += '/' + hostnode_uuid;
|
||||
};
|
||||
var win = window.open(url, '_blank');
|
||||
// FIXME: If win is None, the browser didn't allow opening a new tab, we need to inform the user.
|
||||
win.focus();
|
||||
}
|
||||
|
|
|
@ -16,6 +16,9 @@
|
|||
function flag(hostname_uuid) {
|
||||
window.opener.PermanentNodeHighlight(hostname_uuid);
|
||||
};
|
||||
function openTreeInNewTab(capture_uuid, hostnode_uuid=Null) {
|
||||
window.opener.openTreeInNewTab(capture_uuid, hostnode_uuid);
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
// Source: https://codepen.io/nathanlong/pen/ZpAmjv
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<ul>
|
||||
{% for capture_uuid, urlnode_uuid, title, hostname in details['different_url'] %}
|
||||
<li>
|
||||
<a href="{{ url_for('tree', tree_uuid=capture_uuid, urlnode_uuid=urlnode_uuid) }}">{{ title }}</a> - {{ hostname }}
|
||||
<a href="#/" onclick="openTreeInNewTab('{{ capture_uuid }}', '{{ urlnode_uuid }}')">{{ title }}</a> - {{ hostname }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
@ -47,7 +47,7 @@
|
|||
<ul>
|
||||
{% for capture_uuid, urlnode_uuid, title, hostname in details['same_url'] %}
|
||||
<li>
|
||||
<a href="{{ url_for('tree', tree_uuid=capture_uuid, urlnode_uuid=urlnode_uuid) }}">{{ title }}</a> - {{ hostname }}
|
||||
<a href="#/" onclick="openTreeInNewTab('{{ capture_uuid }}', '{{ urlnode_uuid }}')">{{ title }}</a> - {{ hostname }}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue