2019-02-27 20:00:19 +07:00
|
|
|
function ready(fn) {
|
2019-02-28 02:16:11 +07:00
|
|
|
if (document.attachEvent ? document.readyState === "complete" : document.readyState !== "loading"){
|
|
|
|
fn();
|
|
|
|
} else {
|
|
|
|
document.addEventListener('DOMContentLoaded', fn);
|
2019-02-27 20:00:19 +07:00
|
|
|
}
|
2019-02-28 02:16:11 +07:00
|
|
|
}
|
|
|
|
ready(function(){
|
|
|
|
var ranges = document.querySelectorAll('[repeat]');
|
|
|
|
for (const range in ranges) {
|
|
|
|
if (ranges.hasOwnProperty(range)) {
|
|
|
|
const element = ranges[range];
|
|
|
|
element.addEventListener('change', function(event) {
|
|
|
|
var repeater = document.getElementById(event.target.attributes.repeat.value);
|
|
|
|
repeater.value = event.target.value;
|
|
|
|
});
|
2019-02-27 20:00:19 +07:00
|
|
|
}
|
2019-02-28 02:16:11 +07:00
|
|
|
}
|
|
|
|
});
|
2019-02-27 20:00:19 +07:00
|
|
|
/*
|
|
|
|
stapm_limit_w_range
|
|
|
|
ppt_fast_limit_w_range
|
|
|
|
ppt_slow_limit_w_range
|
|
|
|
temperature_limit_c_range
|
|
|
|
vrm_current_m_a_range
|
|
|
|
*/
|