FreeAstroScience – Donation Widget (WordPress)
Help us keep astronomy & science education free for everyone. Every contribution fuels open-access knowledge.
Donate with PayPal
100% goes to free science education & open-access research
(function(){if(window.matchMedia('(max-width:921.99px)').matches){document.body.classList.add('ast-header-break-point');document.body.classList.remove('ast-desktop');}})();
// Share functionality with Web Share API fallback
function shareEpisode(){
const shareData={
title:'EP16 - Comments on Solar Wind, Aurora and Comets',
text:'Check out this episode from Eureka Moments with FreeAstroScience!',
url:'https://www.spreaker.com/episode/ep16-comments-on-solar-wind-aurora-and-comets--69770461'
};
if(navigator.share&&navigator.canShare(shareData)){
navigator.share(shareData).catch(()=>{});
}else{
// Fallback: copy to clipboard
navigator.clipboard.writeText(shareData.url).then(()=>{
alert('Link copied to clipboard!');
}).catch(()=>{
window.open('https://twitter.com/intent/tweet?text='+encodeURIComponent(shareData.text)+'&url='+encodeURIComponent(shareData.url),'_blank');
});
}
}</p>
<p>// Intersection Observer for lazy animations
if('IntersectionObserver'in window){
const observer=new IntersectionObserver((entries)=>{
entries.forEach(entry=>{
if(entry.isIntersecting){
entry.target.style.animationPlayState='running';
observer.unobserve(entry.target);
}
});
},{threshold:0.1});
document.querySelectorAll('.fade-in,.slide-up').forEach(el=>{
el.style.animationPlayState='paused';
observer.observe(el);
});
}
(adsbygoogle = window.adsbygoogle || []).push({});
(()=>{async function handleCredentialResponse(response){try{const res=await fetch('https://freeastroscience.com/wp-login.php?action=googlesitekit_auth',{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded'},body:new URLSearchParams(response)});/* Preserve comment text in case of redirect after login on a page with a Sign in with Google button in the WordPress comments. */ const commentText=document.querySelector('#comment')?.value;const postId=document.querySelectorAll('.googlesitekit-sign-in-with-google__comments-form-button')?.[0]?.className?.match(/googlesitekit-sign-in-with-google__comments-form-button-postid-(\d+)/)?.[1];if(!! commentText?.length){sessionStorage.setItem(`siwg-comment-text-${postId}`,commentText);}location.reload();}catch(error){console.error(error);}}if(typeof google !=='undefined'){google.accounts.id.initialize({client_id:'251104905146-eghigrtua82ec7aan4em9fle9u5f0ilc.apps.googleusercontent.com',callback:handleCredentialResponse,library_name:'Site-Kit'});}const defaultButtonOptions={"theme":"outline","text":"signin_with","shape":"rectangular"};document.querySelectorAll('.googlesitekit-sign-in-with-google__frontend-output-button').forEach((siwgButtonDiv)=>{const buttonOptions={shape:siwgButtonDiv.getAttribute('data-googlesitekit-siwg-shape')|| defaultButtonOptions.shape,text:siwgButtonDiv.getAttribute('data-googlesitekit-siwg-text')|| defaultButtonOptions.text,theme:siwgButtonDiv.getAttribute('data-googlesitekit-siwg-theme')|| defaultButtonOptions.theme,};if(typeof google !=='undefined'){google.accounts.id.renderButton(siwgButtonDiv,buttonOptions);}});/* If there is a matching saved comment text in sessionStorage,restore it to the comment field and remove it from sessionStorage. */ const postId=document.body.className.match(/postid-(\d+)/)?.[1];const commentField=document.querySelector('#comment');const commentText=sessionStorage.getItem(`siwg-comment-text-${postId}`);if(commentText?.length && commentField && !! postId){commentField.value=commentText;sessionStorage.removeItem(`siwg-comment-text-${postId}`);}})();
/(trident|msie)/i.test(navigator.userAgent)&&document.getElementById&&window.addEventListener&&window.addEventListener("hashchange",function(){var t,e=location.hash.substring(1);/^[A-z0-9_-]+$/.test(e)&&(t=document.getElementById(e))&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())},!1);
var astra = {"break_point":"921","isRtl":"","is_scroll_to_id":"1","is_scroll_to_top":"1","is_header_footer_builder_active":"1","responsive_cart_click":"flyout","is_dark_palette":"","revealEffectEnable":"","edit_post_url":"https://freeastroscience.com/wp-admin/post.php?post={{id}}&action=edit","ajax_url":"https://freeastroscience.com/wp-admin/admin-ajax.php","infinite_count":"2","infinite_total":"0","pagination":"number","infinite_scroll_event":"scroll","no_more_post_message":"No more posts to show.","grid_layout":{"desktop":3,"tablet":1,"mobile":1},"site_url":"https://freeastroscience.com","blogArchiveTitleLayout":"","blogArchiveTitleOn":"","show_comments":"Show Comments","enableHistoryPushState":"1","masonryEnabled":"","blogMasonryBreakPoint":"0"};
//# sourceURL=astra-theme-js-js-extra
https://freeastroscience.com/wp-content/themes/astra/assets/js/minified/frontend.min.js
var astraAddon = {"is_elementor_active":"","sticky_active":"","svgIconClose":"\u003Cspan class=\"ast-icon icon-close\"\u003E\u003Csvg viewbox=\"0 0 512 512\" aria-hidden=\"true\" role=\"img\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"18px\" height=\"18px\"\u003E\n \u003Cpath d=\"M71.029 71.029c9.373-9.372 24.569-9.372 33.942 0L256 222.059l151.029-151.03c9.373-9.372 24.569-9.372 33.942 0 9.372 9.373 9.372 24.569 0 33.942L289.941 256l151.03 151.029c9.372 9.373 9.372 24.569 0 33.942-9.373 9.372-24.569 9.372-33.942 0L256 289.941l-151.029 151.03c-9.373 9.372-24.569 9.372-33.942 0-9.372-9.373-9.372-24.569 0-33.942L222.059 256 71.029 104.971c-9.372-9.373-9.372-24.569 0-33.942z\" /\u003E\n \u003C/svg\u003E\u003C/span\u003E","hf_account_show_menu_on":"hover","hf_account_action_type":"link","hf_account_logout_action":"link","is_header_builder_active":"1"};
//# sourceURL=astra-addon-js-js-extra
https://freeastroscience.com/wp-content/uploads/astra-addon/astra-addon-6a31c76e6d2353-99876224.js
https://freeastroscience.com/wp-content/plugins/astra-addon/assets/js/minified/purify.min.js
https://freeastroscience.com/wp-content/plugins/breeze/assets/js/js-front-end/breeze-lazy-load.min.js
document.addEventListener("DOMContentLoaded", function () {
if ( "function" !== typeof window.LazyLoad && "function" !== typeof LazyLoad ) {
return;
}
var breezeLazyLoad = window.LazyLoad || LazyLoad;
window.lazyLoadInstance = new breezeLazyLoad({
elements_selector: ".br-lazy",
data_src: "breeze",
data_srcset: "brsrcset",
data_sizes: "brsizes",
class_loaded: "br-loaded",
threshold: 300,
});
});
//# sourceURL=breeze-lazy-js-after
window.addEventListener("DOMContentLoaded",(e=>{document.querySelectorAll('img[loading="lazy"]').forEach((e=>{e.getBoundingClientRect().top<=window.innerHeight&&(e.loading="eager")}))}));