mirror of https://github.com/CIRCL/lookyloo
chg: Open related tree in new tab.
parent
ed8ad7b945
commit
db8e79677e
|
@ -78,6 +78,12 @@ function collapse(d) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function openTreeInNewTab(treeUUID) {
|
||||||
|
var win = window.open('/tree/' + treeUUID, '_blank');
|
||||||
|
// FIXME: If win is None, the browser didn't allow opening a new tab, we need to inform the user.
|
||||||
|
win.focus();
|
||||||
|
}
|
||||||
|
|
||||||
function urlnode_click(d) {
|
function urlnode_click(d) {
|
||||||
var url = "/tree/url/" + d.data.uuid;
|
var url = "/tree/url/" + d.data.uuid;
|
||||||
d3.blob(url, {credentials: 'same-origin'}).then(data => {
|
d3.blob(url, {credentials: 'same-origin'}).then(data => {
|
||||||
|
|
|
@ -14,6 +14,12 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function openTreeInNewTab(treeUUID) {
|
||||||
|
window.opener.openTreeInNewTab(treeUUID);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block styles %}
|
{% block styles %}
|
||||||
|
@ -50,7 +56,7 @@
|
||||||
<p>The same file was seen in these captures:</p>
|
<p>The same file was seen in these captures:</p>
|
||||||
<ul>
|
<ul>
|
||||||
{% for capture_uuid, title in captures %}
|
{% for capture_uuid, title in captures %}
|
||||||
<li><a href="{{ url_for('tree', tree_uuid=capture_uuid) }}">{{ title }}</a></li>
|
<li><a href="#/" onclick="openTreeInNewTab('{{ capture_uuid }}')">{{ title }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -14,6 +14,12 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function openTreeInNewTab(treeUUID) {
|
||||||
|
window.opener.openTreeInNewTab(treeUUID);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block styles %}
|
{% block styles %}
|
||||||
|
@ -58,7 +64,7 @@
|
||||||
<p>A cookie with that name was seen in these captures:</p>
|
<p>A cookie with that name was seen in these captures:</p>
|
||||||
<ul>
|
<ul>
|
||||||
{% for capture_uuid, title in captures %}
|
{% for capture_uuid, title in captures %}
|
||||||
<li><a href="{{ url_for('tree', tree_uuid=capture_uuid) }}">{{ title }}</a></li>
|
<li><a href="#/" onclick="openTreeInNewTab('{{ capture_uuid }}')">{{ title }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in New Issue