Skip to content

Commit

Permalink
prevent double click on submit
Browse files Browse the repository at this point in the history
  • Loading branch information
3x1io committed Sep 14, 2023
1 parent 1e860fd commit b0107c4
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion publish/resources/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,21 @@ import TomatoCode from "../../vendor/tomatophp/tomato-admin/resources/js/compone
import TomatoDraggable from "../../vendor/tomatophp/tomato-admin/resources/js/components/TomatoDraggable.vue";

createApp({
render: renderSpladeApp({ el })
render: renderSpladeApp({ el }),
mounted() {
document.querySelectorAll('input').forEach((input) => {
input.attributes['autocomplete'] = 'off';
});

document.querySelectorAll('a').forEach((a) => {
a.addEventListener('click', (e) => {
a.classList.add('noClick');
setTimeout(() => {
a.classList.remove('noClick');
}, 5000)
});
});
}
})
.use(SpladePlugin, {
max_keep_alive: 10,
Expand Down

0 comments on commit b0107c4

Please sign in to comment.