forked from I2P_Developers/i2p.i2p
Console: Rename all the js init() functions
This commit is contained in:
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user