Files
i2p.i2p/apps/routerconsole/jsp/js/configclients.js
zzz 7da2ac9ef3 Console: Fix delete confirmation on /configplugins
Replace /configclients and /configplugins onclick with js file
Remove unsafe CSP on /configclients
2020-05-11 16:43:53 +00:00

24 lines
545 B
JavaScript

function init()
{
var buttons = document.getElementsByClassName("delete");
for(index = 0; index < buttons.length; index++)
{
var button = buttons[index];
addClickHandler(button);
}
}
function addClickHandler(elem)
{
elem.addEventListener("click", function() {
if (!confirm(deleteMessage.replace("{0}", elem.getAttribute("client")))) {
event.preventDefault();
return false;
}
});
}
document.addEventListener("DOMContentLoaded", function() {
init();
}, true);