PageSourceSearch

https://textieldrukshop.nl/wp-content/cache/min/1/1f21b78ed465/wp-…/public/js/form-public.js?ver=1789623366

js textieldrukshop.nl collected 2026-10-04 13:34:34 UTC 3,751 bytes, 8 lines download raw bytes

1jQuery(document).ready(function($){const $fileInput=$('#files');const $fileListDisplay=$('#fileList');const $fileLabel=$('#fileLabel');let filesArray=[];$fileInput.on('change',function(){const newFiles=Array.from(this.files);newFiles.forEach(file=>{if(!filesArray.some(f=>f.name===file.name&&f.size===file.size)){filesArray.push(file);addFileToList(file,filesArray.length-1)}});updateInputFiles()});function addFileToList(file,index){const $li=$('<li>').addClass('file-list-item');const $wrapperDiv=$('<div>').addClass('file-item').text(file.name+' ').append($('<button>').html(`
2						<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>
3					`).attr('type','button').on('click',function(){filesArray.splice(index,1);$li.remove();updateInputFiles()}));$li.append($wrapperDiv);$fileListDisplay.append($li);setTimeout(()=>{$li.addClass('open')},10)}
4function updateInputFiles(){const dataTransfer=new DataTransfer();filesArray.forEach(file=>dataTransfer.items.add(file));$fileInput[0].files=dataTransfer.files}
5const allowedTypes=['.jpg','.png','.pdf','.eps','.ai','.psd'];$fileInput.on('change',function(){const newFiles=Array.from(this.files).filter(file=>{const ext='.'+file.name.split('.').pop().toLowerCase();return allowedTypes.includes(ext)});if(newFiles.length<this.files.length){alert('Sommige bestanden zijn niet toegestaan.');return}
6newFiles.forEach(file=>{if(!filesArray.some(f=>f.name===file.name&&f.size===file.size)){filesArray.push(file);addFileToList(file,filesArray.length-1)}});updateInputFiles()});$('[data-action="form__submit"]').on('click',function(e){e.preventDefault();const $form=$(this).closest('form');const $submitBtn=$(this);if(!$form[0].checkValidity()){$form[0].reportValidity();return}
7$submitBtn.prop('disabled',!0).text('Versturen...');grecaptcha.ready(function(){grecaptcha.execute('6Ldie38rAAAAANzQOmQ6DxY0Pc9xPQw_vy_BATP4',{action:'submit'}).then(function(token){$('#recaptcha_token').val(token);const formData=new FormData();formData.append('action','submit_custom_form');formData.append('nonce',formulier.nonce);const serializedData=$form.serializeArray();serializedData.forEach(function(field){formData.append(field.name,field.value)});const files=$('#files')[0].files;if(files.length>0){for(let i=0;i<files.length;i++){formData.append('files[]',files[i])}}
8$.ajax({url:formulier.ajaxurl,method:'POST',data:formData,processData:!1,contentType:!1,success:function(response){console.log('Success:',response);showMessage('Bericht succesvol verstuurd!','success');$form[0].reset();$('#fileList').empty();$('#fileLabel').text('Drag & Drop je bestanden of Bladeren')},error:function(xhr){console.error('Error:',xhr.responseText);let errorMessage='Er ging iets mis. Probeer het opnieuw.';try{const errorData=JSON.parse(xhr.responseText);if(errorData.data){errorMessage=errorData.data}}catch(e){showMessage(errorMessage,'error')}},complete:function(){$submitBtn.prop('disabled',!1).text('Versturen')}})}).catch(function(error){console.error('reCAPTCHA error:',error);showMessage('reCAPTCHA verificatie mislukt. Probeer het opnieuw.','error');$submitBtn.prop('disabled',!1).text('Versturen')})})});function showMessage(message,type){$('.form-message').remove();const messageClass=type==='success'?'form-message-success':'form-message-error';const messageHtml=`<div class="form-message ${messageClass}">${message}</div>`;$('form').before(messageHtml);if(type==='success'){setTimeout(function(){$('.form-message-success').fadeOut(300,function(){$(this).remove()})},5000)}}})

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.