Online Giving

var breezeGivingEmbedContainer = document.getElementById(‘breeze_giving_embed’); var breezeGivingSubdomain = breezeGivingEmbedContainer.dataset.subdomain; var breezeGivingWidth = breezeGivingEmbedContainer.dataset.width; var breezeGivingBackgroundColor = breezeGivingEmbedContainer.dataset.background_color; var breezeGivingTextColor = breezeGivingEmbedContainer.dataset.text_color; var breezeGivingDonateButtonBackgroundColor = breezeGivingEmbedContainer.dataset.donate_button_background_color; var breezeGivingDonateButtonTextColor = breezeGivingEmbedContainer.dataset.donate_button_text_color; var breezeGivingFundId = breezeGivingEmbedContainer.dataset.fund_id; var breezeGivingFrequency = breezeGivingEmbedContainer.dataset.frequency; var breezeGivingAmount = breezeGivingEmbedContainer.dataset.amount; if(!breezeGivingWidth) { breezeGivingWidth = “100%”; } breezeGivingHeight = “463”; // default but will be overwritten on page load by iFrameResize // build get query var getQuery = ‘?iframe=true’; if(breezeGivingBackgroundColor) { getQuery += ‘&background_color=’ + breezeGivingBackgroundColor; } if(breezeGivingTextColor) { getQuery += ‘&text_color=’ + breezeGivingTextColor; } if(breezeGivingDonateButtonBackgroundColor) { getQuery += ‘&donate_button_background_color=’ + breezeGivingDonateButtonBackgroundColor; } if(breezeGivingDonateButtonTextColor) { getQuery += ‘&donate_button_text_color=’ + breezeGivingDonateButtonTextColor; } if(breezeGivingFundId) { getQuery += ‘&fund_id=’ + breezeGivingFundId; } if(breezeGivingFrequency) { getQuery += ‘&frequency=’ + breezeGivingFrequency; } if(breezeGivingAmount) { getQuery += ‘&amount=’ + breezeGivingAmount; } var iframe = ‘‘; document.getElementById(‘breeze_giving_embed’).innerHTML = iframe; /*! iFrame Resizer (iframeSizer.min.js ) – v3.5.15 – 2017-10-15 * Desc: Force cross domain iframes to size to content. * Requires: iframeResizer.contentWindow.min.js to be loaded into the target frame. * Copyright: (c) 2017 David J. Bradshaw – dave@bradshaw.net * License: MIT */ !function(a){“use strict”;function b(a,b,c){“addEventListener”in window?a.addEventListener(b,c,!1):”attachEvent”in window&&a.attachEvent(“on”+b,c)}function c(a,b,c){“removeEventListener”in window?a.removeEventListener(b,c,!1):”detachEvent”in window&&a.detachEvent(“on”+b,c)}function d(){var a,b=[“moz”,”webkit”,”o”,”ms”];for(a=0;ae&&(e=c,h(V,”Set “+d+” to min value”)),e>b&&(e=b,h(V,”Set “+d+” to max value”)),U[d]=””+e}function g(){function b(){function a(){var a=0,b=!1;for(h(V,”Checking connection is from allowed list of origins: “+d);aP[x][“max”+a])throw new Error(“Value for min”+a+” can not be greater than max”+a)}b(“Height”),b(“Width”),a(“maxHeight”),a(“minHeight”),a(“maxWidth”),a(“minWidth”)}function f(){var a=d&&d.id||S.id+F++;return null!==document.getElementById(a)&&(a+=F++),a}function g(a){return R=a,””===a&&(c.id=a=f(),G=(d||{}).log,R=a,h(a,”Added missing iframe ID: “+a+” (“+c.src+”)”)),a}function i(){switch(h(x,”IFrame scrolling “+(P[x]&&P[x].scrolling?”enabled”:”disabled”)+” for “+x),c.style.overflow=!1===(P[x]&&P[x].scrolling)?”hidden”:”auto”,P[x]&&P[x].scrolling){case!0:c.scrolling=”yes”;break;case!1:c.scrolling=”no”;break;default:c.scrolling=P[x]?P[x].scrolling:”no”}}function k(){(“number”==typeof(P[x]&&P[x].bodyMargin)||”0″===(P[x]&&P[x].bodyMargin))&&(P[x].bodyMarginV1=P[x].bodyMargin,P[x].bodyMargin=””+P[x].bodyMargin+”px”)}function l(){var a=P[x]&&P[x].firstRun,b=P[x]&&P[x].heightCalculationMethod in O;!a&&b&&r({iframe:c,height:0,width:0,type:”init”})}function m(){Function.prototype.bind&&P[x]&&(P[x].iframe.iFrameResizer={close:n.bind(null,P[x].iframe),resize:u.bind(null,”Window resize”,”resize”,P[x].iframe),moveToAnchor:function(a){u(“Move to anchor”,”moveToAnchor:”+a,P[x].iframe,x)},sendMessage:function(a){a=JSON.stringify(a),u(“Send Message”,”message:”+a,P[x].iframe,x)}})}function o(d){function e(){u(“iFrame.onload”,d,c,a,!0),l()}b(c,”load”,e),u(“init”,d,c,a,!0)}function p(a){if(“object”!=typeof a)throw new TypeError(“Options is not an object”)}function q(a){for(var b in S)S.hasOwnProperty(b)&&(P[x][b]=a.hasOwnProperty(b)?a[b]:S[b])}function s(a){return””===a||”file://”===a?”*”:a}function t(a){a=a||{},P[x]={firstRun:!0,iframe:c,remoteHost:c.src.split(“/”).slice(0,3).join(“/”)},p(a),q(a),P[x]&&(P[x].targetOrigin=!0===P[x].checkOrigin?s(P[x].remoteHost):”*”)}function w(){return x in P&&”iFrameResizer”in c}var x=g(c.id);w()?j(x,”Ignored iFrame, already setup.”):(t(d),i(),e(),k(),o(v(x)),m())}function x(a,b){null===Q&&(Q=setTimeout(function(){Q=null,a()},b))}function y(){function a(){function a(a){function b(b){return”0px”===(P[a]&&P[a].iframe.style[b])}function c(a){return null!==a.offsetParent}P[a]&&c(P[a].iframe)&&(b(“height”)||b(“width”))&&u(“Visibility change”,”resize”,P[a].iframe,a)}for(var b in P)a(b)}function b(b){h(“window”,”Mutation observed: “+b[0].target+” “+b[0].type),x(a,16)}function c(){var a=document.querySelector(“body”),c={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0},e=new d(b);e.observe(a,c)}var d=window.MutationObserver||window.WebKitMutationObserver;d&&c()}function z(a){function b(){B(“Window “+a,”resize”)}h(“window”,”Trigger event: “+a),x(b,16)}function A(){function a(){B(“Tab Visable”,”resize”)}”hidden”!==document.visibilityState&&(h(“document”,”Trigger event: Visiblity change”),x(a,16))}function B(a,b){function c(a){return P[a]&&”parent”===P[a].resizeFrom&&P[a].autoResize&&!P[a].firstRun}for(var d in P)c(d)&&u(a,b,document.getElementById(d),d)}function C(){b(window,”message”,l),b(window,”resize”,function(){z(“resize”)}),b(document,”visibilitychange”,A),b(document,”-webkit-visibilitychange”,A),b(window,”focusin”,function(){z(“focus”)}),b(window,”focus”,function(){z(“focus”)})}function D(){function b(a,b){function c(){if(!b.tagName)throw new TypeError(“Object is not a valid DOM element”);if(“IFRAME”!==b.tagName.toUpperCase())throw new TypeError(“Expected