From db8e79677e6be131487603e311eec69e4d9f9de2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Fri, 7 Aug 2020 18:01:06 +0200 Subject: [PATCH] chg: Open related tree in new tab. --- website/web/static/tree.js | 6 ++++++ website/web/templates/body_hash.html | 8 +++++++- website/web/templates/cookie_name.html | 8 +++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/website/web/static/tree.js b/website/web/static/tree.js index 342301a1..4336ad83 100644 --- a/website/web/static/tree.js +++ b/website/web/static/tree.js @@ -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) { var url = "/tree/url/" + d.data.uuid; d3.blob(url, {credentials: 'same-origin'}).then(data => { diff --git a/website/web/templates/body_hash.html b/website/web/templates/body_hash.html index 0a8e7041..a5606f85 100644 --- a/website/web/templates/body_hash.html +++ b/website/web/templates/body_hash.html @@ -14,6 +14,12 @@ }); + + {% endblock %} {% block styles %} @@ -50,7 +56,7 @@

The same file was seen in these captures:

{% endblock %} diff --git a/website/web/templates/cookie_name.html b/website/web/templates/cookie_name.html index 3e21faee..b3146181 100644 --- a/website/web/templates/cookie_name.html +++ b/website/web/templates/cookie_name.html @@ -14,6 +14,12 @@ }); + + {% endblock %} {% block styles %} @@ -58,7 +64,7 @@

A cookie with that name was seen in these captures:

{% endblock %}