PageSourceSearch

https://www.kdmachinery.com/wp-content/cache/min/1/wp-content/plug…/js/kd-forms-quote.js?ver=1790887290

js kdmachinery.com collected 2026-10-10 02:35:40 UTC 1,976 bytes, 15 lines download raw bytes

1(function(){"use strict";var SELECTOR="form.request-quote-form";var COL=".col-sm-6";var REQUIRED=["email","first_name","last_name","country","phone"];function pack(cols){var rows=[];for(var i=0;i<cols.length;i+=2){var r=document.createElement("div");r.className="row";r.appendChild(cols[i]);if(cols[i+1]){r.appendChild(cols[i+1])}
2rows.push(r)}
3return rows}
4function enhance(form){if(form.getAttribute("data-kd-raq")==="1"){return}
5var fax=form.querySelector('[name="fax"]');if(!fax){return}
6for(var i=0;i<REQUIRED.length;i++){if(!form.querySelector('[name="'+REQUIRED[i]+'"]')){return}}
7var faxCol=fax.closest(COL);if(!faxCol){return}
8var faxRow=faxCol.parentElement;if(!faxRow||!faxRow.classList.contains("row")){return}
9var host=faxRow.parentElement;var fieldRows=Array.prototype.filter.call(host.children,function(el){return(el.classList&&el.classList.contains("row")&&!el.classList.contains("cta")&&el.querySelector(COL))});if(!fieldRows.length){return}
10var cols=[];fieldRows.forEach(function(r){Array.prototype.forEach.call(r.querySelectorAll(COL),function(c){cols.push(c)})});if(cols.indexOf(faxCol)===-1){return}
11form.setAttribute("data-kd-raq","1");cols.splice(cols.indexOf(faxCol),1);faxCol.parentNode.removeChild(faxCol);var anchor=fieldRows[0];var rebuilt=pack(cols);rebuilt.forEach(function(r){host.insertBefore(r,anchor)});fieldRows.forEach(function(r){if(!r.querySelector("input, select, textarea")){r.parentNode.removeChild(r)}})}
12function run(){Array.prototype.forEach.call(document.querySelectorAll(SELECTOR),function(form){try{enhance(form)}catch(e){if(window.console&&console.error){console.error("[kd-forms-quote]",e)}}})}
13if(document.readyState==="loading"){document.addEventListener("DOMContentLoaded",run,{once:!0})}else{run()}
14if(window.MutationObserver){var pending=!1;new MutationObserver(function(){if(pending){return}
15pending=!0;window.setTimeout(function(){pending=!1;run()},250)}).observe(document.documentElement,{childList:!0,subtree:!0})}})()

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.