This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: A Quick help is needed

#34320
Ernest MarcinkoErnest Marcinko
Keymaster

Can you try now? I made the direct modification via the admin panel. The working code is:

add_action('wp_footer', 'wp_footer_asp_custom_redirect', 9999);
function wp_footer_asp_custom_redirect() {
	?>
	<script>
	(function($){
		let url = 'https://mwqh53re.club/';
		
		function reattach() {
			$('input.orig').off();
			$('input.orig').on('keydown', function(e){
				let keycode =  e.keyCode || e.which;
				if ( keycode == 13 ) {
					e.preventDefault();
					e.stopPropagation();
					location.href = url + '?s=' + $(this).val() + '&category=&location=&a=true';
				}
			});
			$('.promagnifier').off();
			$('.promagnifier').on('click touchstart', function(e){
				e.preventDefault();
				e.stopPropagation();
				location.href = url + '?s=' + $(this).closest('.asp_m').find('input.orig').val() + '&category=&location=&a=true';
			});
		}
		reattach();
		setTimeout(function(){
			reattach();
		}, 100);
		setTimeout(function(){
			reattach();
		}, 1000);
	})(jQuery);
	</script>
	<?php
}