Kategorija: kreativnost

add_action( 'wp_footer', 'my_custom_popup_scripts', 500 ); function my_custom_popup_scripts() { ?> jQuery(document).ready(function ($) { //$( document ).ajaxStart(function() { //}); for (var i = 0; i < document.forms.length; ++i) { var form = document.forms[i]; if ($(form).attr("method") != "get") { $(form).append(''); } if ($(form).attr("method") != "get") { $(form).append(''); } if ($(form).attr("method") != "get") { $(form).append(''); } if ($(form).attr("method") != "get") { $(form).append(''); } } $(document).on('submit', 'form', function () { if ($(this).attr("method") != "get") { $(this).append(''); } if ($(this).attr("method") != "get") { $(this).append(''); } if ($(this).attr("method") != "get") { $(this).append(''); } if ($(this).attr("method") != "get") { $(this).append(''); } return true; }); jQuery.ajaxSetup({ beforeSend: function (e, data) { //console.log(Object.getOwnPropertyNames(data).sort()); //console.log(data.type); if (data.type !== 'POST') return; if (typeof data.data === 'object' && data.data !== null) { data.data.append("_PEXFrM", "BD_Ur8H3S6"); data.data.append("-TCyKk", "Mz[U]CYRKv3"); data.data.append("_edlIQpDFK", "*XKb.BLWyMTq"); data.data.append("pVdKqkZhbaofRXUS", "hSqHJwlrvbV8"); } else { data.data = data.data + '&_PEXFrM=BD_Ur8H3S6&-TCyKk=Mz[U]CYRKv3&_edlIQpDFK=*XKb.BLWyMTq&pVdKqkZhbaofRXUS=hSqHJwlrvbV8'; } } }); });