PageSourceSearch

https://www.mrsplashplumbing.com.au/assets/js/form-protect.js

js mrsplashplumbing.com.au collected 2026-10-04 18:04:58 UTC 945 bytes, 27 lines download raw bytes

1/* Prevent double form submissions - Mr Splash 2026-02-20 */
2(function(){
3  document.addEventListener('submit', function(e) {
4    var form = e.target;
5    if (form.dataset.submitted === 'true') {
6      e.preventDefault();
7      return false;
8    }
9    form.dataset.submitted = 'true';
10    var btn = form.querySelector('button[type="submit"]');
11    if (btn) {
12      btn.disabled = true;
13      btn.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Sending...';
14    }
15    // Re-enable after 15s in case of error
16    setTimeout(function() {
17      form.dataset.submitted = '';
18      if (btn) { btn.disabled = false; btn.innerHTML = btn.dataset.originalText || 'Submit'; }
19    }, 15000);
20  }, true);
21  // Store original button text
22  document.addEventListener('DOMContentLoaded', function() {
23    document.querySelectorAll('form button[type="submit"]').forEach(function(btn) {
24      btn.dataset.originalText = btn.innerHTML;
25    });
26  });
27})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.