Packages

ForkWithFlags.UI, a fork of the FunWithFlags.UI web dashboard, made for integration with the ForkWithFlags Elixir package.

Current section

Files

Jump to
fork_with_flags_ui priv static details.js
Raw

priv/static/details.js

document
.querySelectorAll("[data-confirm]")
.forEach((item) => {
item.addEventListener("click", (e) => {
if (confirm(e.target.dataset.confirm)) {
return true;
} else {
e.preventDefault();
return false;
}
});
});