forked from I2P_Developers/i2p.i2p
32 lines
856 B
JavaScript
32 lines
856 B
JavaScript
/* @license http://creativecommons.org/publicdomain/zero/1.0/legalcode CC0-1.0 */
|
|
|
|
// This component is dedicated to the public domain. It uses the CC0
|
|
// as a formal dedication to the public domain and in circumstances where
|
|
// a public domain is not usable.
|
|
|
|
function initConfigClients()
|
|
{
|
|
var buttons = document.getElementsByClassName("delete");
|
|
for(index = 0; index < buttons.length; index++)
|
|
{
|
|
var button = buttons[index];
|
|
addCCClickHandler(button);
|
|
}
|
|
}
|
|
|
|
function addCCClickHandler(elem)
|
|
{
|
|
elem.addEventListener("click", function() {
|
|
if (!confirm(deleteMessage.replace("{0}", elem.getAttribute("client")))) {
|
|
event.preventDefault();
|
|
return false;
|
|
}
|
|
});
|
|
}
|
|
|
|
document.addEventListener("DOMContentLoaded", function() {
|
|
initConfigClients();
|
|
}, true);
|
|
|
|
/* @license-end */
|