Console: onchange removal

This commit is contained in:
zzz
2020-05-12 18:57:29 +00:00
parent a47f6d1b2e
commit fe36482063
4 changed files with 23 additions and 6 deletions

View 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);