forked from I2P_Developers/i2p.i2p
Console: onchange removal
This commit is contained in:
20
apps/routerconsole/jsp/js/stats.js
Normal file
20
apps/routerconsole/jsp/js/stats.js
Normal file
@ -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);
|
Reference in New Issue
Block a user