diff --git a/apps/i2psnark/resources/js/delete.js b/apps/i2psnark/resources/js/delete.js index c5b8a42be492d6dc2e48692b4c605c7f754d1e24..c6592104c5c8575c9cfb4297662c1ddc3def80c7 100644 --- a/apps/i2psnark/resources/js/delete.js +++ b/apps/i2psnark/resources/js/delete.js @@ -1,4 +1,4 @@ -function init() +function initDelete() { var buttons = document.getElementsByClassName("delete1"); for(index = 0; index < buttons.length; index++) @@ -35,5 +35,5 @@ function addClickHandler2(elem) } document.addEventListener("DOMContentLoaded", function() { - init(); + initDelete(); }, true); diff --git a/apps/i2ptunnel/jsp/js/delete.js b/apps/i2ptunnel/jsp/js/delete.js index bf005037b0298568af88462be570d48d245a78e5..630e32c1f8cdd1cefed026613df2369abc6edb7b 100644 --- a/apps/i2ptunnel/jsp/js/delete.js +++ b/apps/i2ptunnel/jsp/js/delete.js @@ -1,4 +1,4 @@ -function init() +function initDelete() { var buttons = document.getElementsByClassName("delete"); for(index = 0; index < buttons.length; index++) @@ -19,5 +19,5 @@ function addClickHandler(elem) } document.addEventListener("DOMContentLoaded", function() { - init(); + initDelete(); }, true); diff --git a/apps/routerconsole/jsp/js/configclients.js b/apps/routerconsole/jsp/js/configclients.js index 657e29f8203d066e6acf690bfef38115c54c8ee9..4acac38ec1c85472bb83a0bbe89373e45e7b0080 100644 --- a/apps/routerconsole/jsp/js/configclients.js +++ b/apps/routerconsole/jsp/js/configclients.js @@ -1,14 +1,14 @@ -function init() +function initConfigClients() { var buttons = document.getElementsByClassName("delete"); for(index = 0; index < buttons.length; index++) { var button = buttons[index]; - addClickHandler(button); + addCCClickHandler(button); } } -function addClickHandler(elem) +function addCCClickHandler(elem) { elem.addEventListener("click", function() { if (!confirm(deleteMessage.replace("{0}", elem.getAttribute("client")))) { @@ -19,5 +19,5 @@ function addClickHandler(elem) } document.addEventListener("DOMContentLoaded", function() { - init(); + initConfigClients(); }, true); diff --git a/apps/routerconsole/jsp/js/configstats.js b/apps/routerconsole/jsp/js/configstats.js index 81bf111510d5f1076f7e0d1048f20d4defa9465e..06725e5234bb4b806b62af1ab7b7fa113d57802b 100644 --- a/apps/routerconsole/jsp/js/configstats.js +++ b/apps/routerconsole/jsp/js/configstats.js @@ -1,4 +1,4 @@ -function init() +function initConfigStats() { checkAll = false; var buttons = document.getElementsByClassName("script"); @@ -7,10 +7,10 @@ function init() var button = buttons[index]; // toggle-foo var group = button.id.substring(7); - addClickHandler(button, group); + addCSClickHandler(button, group); } } -function addClickHandler(elem, category) +function addCSClickHandler(elem, category) { elem.addEventListener("click", function(){toggleAll(category); event.preventDefault(); return false;}); } @@ -64,5 +64,5 @@ function toggleAll(category) } document.addEventListener("DOMContentLoaded", function() { - init(); + initConfigStats(); }, true); diff --git a/apps/routerconsole/jsp/js/stats.js b/apps/routerconsole/jsp/js/stats.js index 9685c5aedcbec005c31f9f0a9e9a3bfcbde76b35..2e80fa814851080a9bb3c26c728b893f1c16f718 100644 --- a/apps/routerconsole/jsp/js/stats.js +++ b/apps/routerconsole/jsp/js/stats.js @@ -1,14 +1,14 @@ -function init() +function initStats() { var buttons = document.getElementsByClassName("onchange"); for(index = 0; index < buttons.length; index++) { var button = buttons[index]; - addChangeHandler(button); + addSChangeHandler(button); } } -function addChangeHandler(elem) +function addSChangeHandler(elem) { elem.addEventListener("change", function() { location.href=event.target.value; @@ -16,5 +16,5 @@ function addChangeHandler(elem) } document.addEventListener("DOMContentLoaded", function() { - init(); + initStats(); }, true);