diff --git a/apps/routerconsole/java/src/net/i2p/router/web/helpers/StatsGenerator.java b/apps/routerconsole/java/src/net/i2p/router/web/helpers/StatsGenerator.java index f04df83c6d..a34d1661d4 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/helpers/StatsGenerator.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/helpers/StatsGenerator.java @@ -69,7 +69,7 @@ public class StatsGenerator { buf.append("
"); buf.append(""); diff --git a/apps/routerconsole/jsp/csp-unsafe.jsi b/apps/routerconsole/jsp/csp-unsafe.jsi deleted file mode 100644 index 720a26a171..0000000000 --- a/apps/routerconsole/jsp/csp-unsafe.jsi +++ /dev/null @@ -1,4 +0,0 @@ -<% - // Add this AFTER css.jsi if there's any onclick attributes in the page - response.setHeader("Content-Security-Policy", "default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline'; form-action 'self'; frame-ancestors 'self'; object-src 'none'; media-src 'none'"); -%> diff --git a/apps/routerconsole/jsp/js/stats.js b/apps/routerconsole/jsp/js/stats.js new file mode 100644 index 0000000000..9685c5aedc --- /dev/null +++ b/apps/routerconsole/jsp/js/stats.js @@ -0,0 +1,20 @@ +function init() +{ + var buttons = document.getElementsByClassName("onchange"); + for(index = 0; index < buttons.length; index++) + { + var button = buttons[index]; + addChangeHandler(button); + } +} + +function addChangeHandler(elem) +{ + elem.addEventListener("change", function() { + location.href=event.target.value; + }); +} + +document.addEventListener("DOMContentLoaded", function() { + init(); +}, true); diff --git a/apps/routerconsole/jsp/stats.jsp b/apps/routerconsole/jsp/stats.jsp index 0e14ef6b1f..4be78bb69b 100644 --- a/apps/routerconsole/jsp/stats.jsp +++ b/apps/routerconsole/jsp/stats.jsp @@ -4,9 +4,9 @@ <%@include file="css.jsi" %> -<%@include file="csp-unsafe.jsi" %> <%=intl.title("statistics")%> <%@include file="summaryajax.jsi" %> + <%@include file="summary.jsi" %>