PageSourceSearch

https://lifespan.io/wp-content/themes/fundify/js/customcode.js?ver=1.0.0.1786984433

js lifespan.io collected 2026-10-02 04:59:59 UTC 9,692 bytes, 215 lines download raw bytes

1jQuery('a[href^="mailto:"]').on('click', function(e) {
2    e.preventDefault();
3    window.location = jQuery(this).attr('href');
4});
5jQuery(document).ready(function($){
6	$(".sort-tabs.campaign a[href^=#]").on("click", function(e) {
7		e.preventDefault();
8		history.pushState({}, "", this.href);
9	});
10	if($(".single-download").length || $(".page-template-contact-template").length ){
11		$(".pledge_place .fa-share").on("click", function(e) {
12			// LSXC-45: trim hidden textarea so copied reward hash URLs have no leading space.
13			$('.clipboard_message').stop();
14			$('.campaigns-centered-copy-message').html( $(this).parent().parent().parent().parent().find('.clipboard_message').html() );
15			$('.campaigns-centered-copy-message').fadeIn("fast").delay(2800).fadeOut("fast");
16			e.preventDefault();
17			var $ta = $(this).prev();
18			$ta.val($.trim($ta.val()));
19			$ta.select();
20			document.execCommand('copy');
21			return false;
22		});
23		function address_hash_load(){
24			if(window.location.hash){
25				var hash = window.location.hash.substring(1);
26				if(hash == "description"){
27					$('.description-tab-button').click();
28				}
29				if(hash.indexOf("suggest-a-scientist") !== -1){
30					$('.page-template-contact-template .wpcf7-select').val('Suggest a Scientist').change();
31				}
32				if(hash == "updates"){
33					$('.updates-tab-button').click();
34				}
35				if(hash == "comments"){
36					$('.comments-tab-button').click();
37				}
38				if(hash == "backers"){
39					$('.backers-tab-button').click();
40				}
41				if(hash.indexOf("reward_") !== -1){
42					$('.'+hash).click();
43				}
44				}else{
45				$('.campaign-tabs #backers,.campaign-tabs #updates,.campaign-tabs #comments,.campaign-tabs #respond').hide();
46				var isMobile = false;
47				var WindowScroll = $(window).scrollTop();
48				if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) 
49				|| /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.
49substr(0,4))) isMobile = true;
50				if( isMobile && WindowScroll == 0){
51					$('html, body').delay(600).animate({scrollTop: jQuery(".tabber.description-tab-button").offset().top -25}, 1400);
52				}
53			}
54		}
55		address_hash_load();
56		$("#description a[href^=#]").on("click", function(e) {
57			e.preventDefault();
58			history.pushState({}, "", this.href);
59			address_hash_load();
60		});
61	}
62
63	$("a").on("click", function(e) {
64	    // LSXC-45: skip anchors with no href so this handler cannot throw.
65	    var url = $(this).attr("href");
66	    if (url && url.includes("reward_")) {
67	        var reward = url.split("#")[1]; // get part after "#"
68	        $('.'+reward).click();
69	    }
70	});
71
72	
73	if($('#text-335').length > 0) {
74		if($('#text-335 .textwidget .upcoming-events-wrapper').html() == undefined) {
75			$('#text-335').hide();
76		}
77	}
78	
79	$(".mailchimp_form_simple").on("submit", function(evt){
vendor: 407 bytes, lines 79-91
79
80		(function (i, s, o, g, r, a, m) {
81			i['GoogleAnalyticsObject'] = r;
82			i[r] = i[r] || function () {
83				(i[r].q = i[r].q || []).push(arguments)
84			}, i[r].l = 1 * new Date();
85			a = s.createElement(o), m = s.getElementsByTagName(o)[0];
86			a.async = 1;
87			a.src = g;
88			m.parentNode.insertBefore(a, m)
89		})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
90		
91		ga('create', '
91UA-66470543-1
vendor: 14 bytes, lines 91-92
91', 'auto');
92		
92ga('send', 'event', 'Join the Newsletter', 'Submit', $("#an-mailchimp-email-2").val(), 1);
93	});
94});
95$('html, body').on({ 'touchstart' : function(){
96	$('html, body').clearQueue();
97	$('html, body').stop();
98} 
99});
100
101function load_social_media_scripts_delayed(){
102	/*window.fbAsyncInit = function() {
103		FB.init({
104			appId : '393571917345276',
105			xfbml : true,
106			version : 'v2.5'
107		});
108	};
109	(function(d, s, id){
110		var js, fjs = d.getElementsByTagName(s)[0];
111		if (d.getElementById(id)) {return;}
112		js = d.createElement(s); js.id = id;
113		js.src = "//connect.facebook.net/en_US/sdk.js";
114		fjs.parentNode.insertBefore(js, fjs);
115	}(document, 'script', 'facebook-jssdk'));
116	!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");*/
117}
118
119/*! js-cookie v3.0.0-rc.0 | MIT */
120!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self,function(){var r=e.Cookies,n=e.Cookies=t();n.noConflict=function(){return e.Cookies=r,n}}())}(this,function(){"use strict";function e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}var t={read:function(e){return e.replace(/%3B/g,";")},write:function(e){return e.replace(/;/g,"%3B")}};return function r(n,i){function o(r,o,u){if("undefined"!=typeof document){"number"==typeof(u=e({},i,u)).expires&&(u.expires=new Date(Date.now()+864e5*u.expires)),u.expires&&(u.expires=u.expires.toUTCString()),r=t.write(r).replace(/=/g,"%3D"),o=n.write(String(o),r);var c="";for(var f in u)u[f]&&(c+="; "+f,!0!==u[f]&&(c+="="+u[f].split(";")[0]));return document.cookie=r+"="+o+c}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var r=document.cookie?document.cookie.split("; "):[],i={},o=0;o<r.length;o++){var u=r[o].split("="),c=u.slice(1).join("="),f=t.read(u[0]).replace(/%3D/g,"=");if(i[f]=n.read(c,f),e===f)break}return e?i[e]:i}},remove:function(t,r){o(t,"",e({},r,{expires:-1}))},withAttributes:function(t){return r(this.converter,e({},this.attributes,t))},withConverter:function(t){return r(e({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(i)},converter:{value:Object.freeze(n)}})}(t,{path:"/"})});
121
122
123function support_format_webp()
124{
125	var elem = document.createElement('canvas');
126	
127	if (!!(elem.getContext && elem.getContext('2d')))
128	{
129		return elem.toDataURL('image/webp').indexOf('data:image/webp') == 0;
130	}
131	else
132	{
133		return false;
134	}
135}
136if( !support_format_webp() ) {
137	var my_src = '';
138	jQuery('img').each(function() {
139		my_src = jQuery(this).attr('src');
140		if( my_src.search('data:image') == -1 ) {
141			jQuery(this).attr('src', my_src + '?nowebp');
142		}
143	});
144}
145
146
147/*
vendor: 397 bytes, lines 147-155
147!function(f,b,e,v,n,t,s)
148{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
149n.callMethod.apply(n,arguments):n.queue.push(arguments)};
150if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
151n.queue=[];t=b.createElement(e);t.async=!0;
152t.src=v;s=b.getElementsByTagName(e)[0];
153s.parentNode.insertBefore(t,s)}(window,document,'script',
154'https://connect.facebook.net/en_US/fbevents.js');
155fbq('init', '
155126354934686347
vendor: 30 bytes, lines 155-156
155'); 
156fbq('track', 'PageView');
156*/
157
158window._mNHandle = window._mNHandle || {};
159window._mNHandle.queue = window._mNHandle.queue || [];
160medianet_versionId = "3121199";
161
162/*window.onerror = function (msg, url, line) {
163
164	jQuery.ajax({
165			type:"POST",
166			url:"/wp-admin/admin-ajax.php",
167			data: {
168				action: "send_console_error_email",
169				msg : msg,
170				url : url,
171				line : line,
172				currentURL: window.location.href,
173				type: 'json'
174			},
175			dataType: 'json',
176			success: function(results){
177				
178			},
179			error: function(results) {
180				console.log('Something Wrong...'); 
181			}
182		});
183		return true;
184}*/
185
186
187// window.addEventListener("error", handleError, true);
188
189function handleError(evt) {
190	console.log(evt);
191    // if (evt.message) { // Chrome sometimes provides this
192    //   jQuery.ajax({
193		// 	type:"POST",
194		// 	url:"/wp-admin/admin-ajax.php",
195		// 	data: {
196		// 		action: "send_console_error_email",
197		// 		msg : evt.message,
198		// 		url : evt.filename,
199		// 		line : evt.lineno,
200		// 		currentURL: window.location.href,
201		// 		type: 'json'
202		// 	},
203		// 	dataType: 'json',
204		// 	success: function(results){
205				
206		// 	},
207		// 	error: function(results) {
208		// 		console.log('Something Wrong...'); 
209		// 	}
210		// });
211	  
212    // } else {
213    //   /*alert("error: "+evt.type+" from element: "+(evt.srcElement || evt.target));*/
214    // }
215}

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.