mirror of
				https://github.com/KevinMidboe/zoff.git
				synced 2025-10-29 18:00:23 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			1 line
		
	
	
		
			1.5 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			1 line
		
	
	
		
			1.5 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
!function(){$(document).ready(function(){$("#about").modal(),$(".help-button-footer").hide(),$("#contact").modal(),$("#contact-container").empty(),$("#contact-container").html("Send a mail to us: <a title='Open in client' href='mailto:contact@zoff.me?Subject=Contact%20Zoff'>contact@zoff.me</a>"),$("#submit-contact-form").hide(),$(".token-form").on("submit",function(e){e.preventDefault();var t=$("#email_address").val();$("#email_address").attr("readonly",!0),$(".submit").toggleClass("disabled"),$(".full-form-token").removeClass("hide");var a=grecaptcha.getResponse();$.ajax({type:"POST",url:"/api/apply",data:{email:t,"g-recaptcha-response":a},success:function(e){$(".full-form-token").addClass("hide"),"OK"!=e?($("#email_address").attr("readonly",!0),$(".submit").toggleClass("disabled"),Materialize.toast("Couldn't send email.",3e3,"red lighten")):(Materialize.toast("Email sent!",3e3,"green lighten"),grecaptcha.reset())},error:function(e){$(".full-form-token").addClass("hide"),$("#email_address").attr("readonly",!1),$(".submit").toggleClass("disabled")}})}),$("#submit-contact-form").on("click",function(e){e.preventDefault(),$("#contact-form").submit()})});Element.prototype.remove=function(){this.parentElement.removeChild(this)},NodeList.prototype.remove=HTMLCollection.prototype.remove=function(){for(var e=0,t=this.length;e<t;e++)this[e]&&this[e].parentElement&&this[e].parentElement.removeChild(this[e])},String.prototype.startsWith=function(e,t){return t=t||0,this.indexOf(e,t)===t}}(); |