Add css/js class enable_on_pageload.

This commit is contained in:
voussoir 2020-08-28 16:23:28 -07:00
parent fa8bbf92f9
commit 2eed3ff1c5

View file

@ -304,6 +304,17 @@ function init_button_with_confirm()
}); });
} }
common.init_enable_on_pageload =
function init_enable_on_pageload()
{
var elements = Array.from(document.getElementsByClassName("enable_on_pageload"));
elements.forEach(function(element)
{
element.disabled = false;
element.classList.remove("enable_on_pageload");
});
}
common.refresh = common.refresh =
function refresh() function refresh()
{ {
@ -315,5 +326,6 @@ function on_pageload()
{ {
common.init_atag_merge_params(); common.init_atag_merge_params();
common.init_button_with_confirm(); common.init_button_with_confirm();
common.init_enable_on_pageload();
} }
document.addEventListener("DOMContentLoaded", common.on_pageload); document.addEventListener("DOMContentLoaded", common.on_pageload);