PageSourceSearch

https://wearechange.org/wp-content/cache/wpfc-minified/d5moswtf/f97n4.js

js wearechange.org collected 2026-10-03 21:39:33 UTC 8,919 bytes, 241 lines download raw bytes

1var disqus_shortname=countVars.disqusShortname;
2(function (){
3var nodes=document.getElementsByTagName('span');
4for (var i=0, url; i < nodes.length; i++){
5if(nodes[i].className.indexOf('dsq-postid')!=-1&&nodes[i].parentNode.tagName=='A'){
6nodes[i].parentNode.setAttribute('data-disqus-identifier', nodes[i].getAttribute('data-dsqidentifier'));
7url=nodes[i].parentNode.href.split('#', 1);
8if(url.length==1){ url=url[0]; }else{ url=url[1]; }
9nodes[i].parentNode.href=url + '#disqus_thread';
10}}
11var s=document.createElement('script');
12s.async=true;
13s.type='text/javascript';
14s.src='https://' + disqus_shortname + '.disqus.com/count.js';
15(document.getElementsByTagName('HEAD')[0]||document.getElementsByTagName('BODY')[0]).appendChild(s);
16}());
17function hm_bbpui_file_upload(field_id){
18jQuery('#hm_bbpui_file_form, #hm_bbpui_file_frame').remove();
19jQuery('#' + field_id).parent().css('overflow', 'hidden')
20.append('<br /><form id="hm_bbpui_file_form" action="?hm_bbpui_do_upload=1" method="post" target="hm_bbpui_file_frame" enctype="multipart/form-data" onsubmit="hm_bbpui_file_upload_submit();" data-field-id="' + field_id + '">' +
21'<input type="file" name="hm_bbpui_file" id="hm_bbpui_file" tabindex="-1" onchange="jQuery(this).parent().submit();" />' +
22'<iframe id="hm_bbpui_file_frame" name="hm_bbpui_file_frame" />');
23jQuery('#hm_bbpui_file').trigger('click');
24}
25function hm_bbpui_file_upload_submit(){
26jQuery('#hm_bbpui_file_frame').on('load', function(){
27var response=jQuery('#hm_bbpui_file_frame').contents().find('body').text();
28if(response==''||response=='Error'){
29alert('The image could not be uploaded. Please check that it is a valid JPEG, PNG, or GIF file and that the file size is not too large.');
30response='';
31}
32jQuery('#' + jQuery('#hm_bbpui_file_form').data('field-id')).val(response).prop('disabled', false);
33jQuery('#hm_bbpui_file_frame').off('load');
34});
35jQuery('#' + jQuery('#hm_bbpui_file_form').data('field-id')).prop('disabled', true).val('Please wait...');
36return true;
37};
38var stripeHandlerNG=function (data){
39jQuery('input#stripeAmount_' + data.uniq_id).keydown(function (e){
40if(e.keyCode===13){
41e.preventDefault();
42jQuery('#asp_ng_button_' + data.uniq_id).click();
43return false;
44}});
45this.isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);
46this.checkPPVisible=function (){
47if(parent.iframe.find('#Aligner-item').is(':hidden')){
48parent.form.submit();
49return true;
50}
51setTimeout(this.checkPPVisible, 100);
52}
53this.validateAmount=function (){
54var amount=jQuery('input#stripeAmount_' + data.uniq_id).val();
55data.amountOpts={ applySepOpts: 0 };
56data.minAmounts=[];
57if(data.amountOpts.applySepOpts!=0){
58amount=amount.replace(data.amountOpts.thousandSep, '');
59amount=amount.replace(data.amountOpts.decimalSep, '.');
60}else{
61amount=amount.replace(/\$/g, '');
62amount=amount.replace(/\,/g, '');
63amount=amount.replace(/\ /g, '');
64}
65amount=parseFloat(amount);
66if(isNaN(amount)){
67jQuery('#error_explanation_' + data.uniq_id).hide().html('Enter valid amount').fadeIn('slow');
68return false;
69}
70var displayAmount=amount.toFixed(2).toString();
71if(data.amountOpts.applySepOpts!=0){
72displayAmount=displayAmount.replace('.', data.amountOpts.decimalSep);
73}
74if(data.zeroCents.indexOf(data.currency) <=-1){
75}
76jQuery('#error_explanation_' + data.uniq_id).html('');
77jQuery('input#stripeAmount_' + data.uniq_id).val(displayAmount);
78return amount;
79}
80this.handleModal=function (show){
81if(parent.data.show_custom_amount_input){
82var pass_amount=parent.validateAmount();
83if(!pass_amount){
84return false;
85}}
86if(!parent.modal){
87parent.modal=jQuery('div[data-asp-iframe-prod-id="' + parent.data.product_id + '"][id="asp-payment-popup-' + parent.data.uniq_id + '"]');
88if(parent.modal.length===0){
89jQuery('body').append('<div id="asp-payment-popup-' + parent.data.uniq_id + '" style="display: none;" data-asp-iframe-prod-id="' + parent.data.product_id + '" class="asp-popup-iframe-cont"><iframe frameborder="0" allowtransparency="true" class="asp-popup-iframe" allow="payment" allowpaymentrequest="true" src="' + parent.data.iframe_url + '"></iframe></div>');
90parent.modal=jQuery('#asp-payment-popup-' + parent.data.uniq_id);
91}
92if(show){
93window.aspVisibleModalObj=parent.modal;
94parent.modal.css('display', 'flex').hide().fadeIn();
95}
96var iframe=parent.modal.find('iframe');
97parent.iframe=iframe;
98iframe.on('load', function (){
99if(parent.redirectToResult){
100window.location.href=iframe[0].contentWindow.location.href;
101return false;
102}
103if(pass_amount){
104iframe.contents().find('#amount').val(pass_amount);
105iframe[0].contentWindow.triggerEvent(iframe.contents().find('#amount')[0], 'change');
106}
107if(parent.data.thankyou_page_url){
108iframe.contents().find('#thankyou_page_url').val(parent.data.thankyou_page_url);
109}
110iframe[0].contentWindow['doSelfSubmit']=data.doSelfSubmit;
111parent.iForm=iframe.contents().find('form#payment-form');
112parent.iForm.on('submit', function (e){
113e.preventDefault();
114if(parent.form_submitted||parent.redirectToResult){
115return false;
116}
117var token=parent.iForm.find('input#payment-intent').val();
118if(token!==''){
119if(parent.form.length===0){
120console.log('Waiting for iframe to complete loading');
121parent.redirectToResult=true;
122return true;
123}
124var hiddenInputsDiv=parent.form.find('div.asp-child-hidden-fields');
125parent.iForm.find('[name!=""]').each(function (){
126if(jQuery(this).attr('name')){
127jQuery(this).attr('name', 'asp_' + jQuery(this).attr('name'));
128var clonedItem=jQuery(this).clone();
129if(jQuery(this).is('select')){
130clonedItem.prop('selectedIndex', jQuery(this).prop('selectedIndex'));
131}
132hiddenInputsDiv.append(clonedItem);
133}});
134console.log('Parent form submit');
135parent.form_submitted=true;
136if(parent.isSafari){
137parent.checkPPVisible();
138}else{
139parent.form.submit();
140}}
141return false;
142});
143});
144}else{
145if(pass_amount){
146parent.iframe.contents().find('#amount').val(pass_amount);
147parent.iframe[0].contentWindow.triggerEvent(parent.iframe.contents().find('#amount')[0], 'change');
148}
149window.aspVisibleModalObj=parent.modal;
150parent.modal.css('display', 'flex').hide().fadeIn();
151parent.iframe[0].contentWindow.popupDisplayed();
152}};
153var parent=this;
154parent.data=data;
155parent.form=jQuery('form#asp_ng_form_' + parent.data.uniq_id);
156window.WPASPDocumentElementOrigOverflow=jQuery('html').css('overflow');
157jQuery('#asp_ng_button_' + parent.data.uniq_id).prop('disabled', false);
158if(parent.data.preload){
159parent.handleModal(false);
160}else if(parent.data.prefetch){
161parent.data.iframe_url=parent.data.iframe_url + '&ckey=' + wpASPNG.ckey;
162jQuery('body').append('<link rel="prefetch" as="document" href="' + parent.data.iframe_url + '">');
163}
164var el='#asp_ng_button_' + parent.data.uniq_id;
165if(data.attachToElement){
166el=data.attachToElement;
167}
168jQuery(el).click(function (e){
169jQuery('html').css('overflow', 'hidden');
170e.preventDefault();
171parent.handleModal(true);
172});
173};
174function WPASPClosePaymentPopup(){
175window.aspVisibleModalObj.fadeOut();
176jQuery('html').css('overflow', window.WPASPDocumentElementOrigOverflow);
177}
178function WPASPAttachToAElement(el){
179var hrefStr=jQuery(el).attr('href');
180if(!hrefStr){
181return false;
182}
183var regExp=new RegExp('asp_action=show_pp&product_id=[0-9]*(.*)|' + wpASPNG.ppSlug + '(.*)product_id=[0-9]*(.*)');
184var meinHref=hrefStr.match(regExp);
185if(meinHref[0]){
186var productId=meinHref[0].match(/product_id=([0-9]+)/);
187if(productId[1]){
188var params='';
189if(meinHref[1]){
190params=meinHref[1];
191}
192WPASPAttach(el, productId[1], params);
193}}
194return true;
195}
196function WPASPAttach(el, prodId, params){
197var uniqId=Math.random().toString(36).substr(2, 9);
198var item_price=jQuery(el).data('asp-price');
199if(item_price){
200params +='&price=' + item_price;
201}
202var params_sep='&';
203if(wpASPNG.iframeUrl.indexOf('?')===-1){
204params_sep='?';
205}
206new stripeHandlerNG({ 'attachToElement': el, 'uniq_id': uniqId, 'product_id': prodId, 'doSelfSubmit': true, 'iframe_url': wpASPNG.iframeUrl + params_sep + 'product_id=' + prodId + params, 'prefetch': wpASPNG.prefetch==='1' ? true:false });
207}
208function WPASPDocReady(callbackFunc){
209if(document.readyState!=='loading'){
210callbackFunc();
211}else if(document.addEventListener){
212document.addEventListener('DOMContentLoaded', callbackFunc);
213}else{
214document.attachEvent('onreadystatechange', function (){
215if(document.readyState==='complete'){
216callbackFunc();
217}});
218}}
219WPASPDocReady(function (){
220if(typeof wpaspInitOnDocReady!=='undefined'){
221console.log('ASP: Creating buttons on page load');
222wpaspInitOnDocReady.forEach(function (data){
223new stripeHandlerNG(data);
224});
225}
226jQuery('[class*="asp-attach-product-"]').each(function (id, el){
227var classStr=jQuery(el).attr('class');
228var meinClass=classStr.match(/asp-attach-product-[0-9]*/);
229if(meinClass[0]){
230var productId=meinClass[0].match(/([0-9].*)/);
231if(productId[0]){
232WPASPAttach(el, productId[0], '');
233}}
234});
235jQuery('a[href*="asp_action=show_pp&product_id="],a[href*="' + wpASPNG.ppSlug + '"]').each(function (id, el){
236WPASPAttachToAElement(el);
237});
238jQuery("#asp-sort-by").change(function(){
239jQuery("#asp-sort-by-form").submit();
240});
241});

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.