PageSourceSearch

https://edtechbites.com/_static/??-eJyNjsEOgjAQRH/IsjEhCAfjp5hSFln…IH81vQsWHCyPAR8VZH2p7d4PV/aru7qpmk/yaJa8w==

js edtechbites.com collected 2026-10-01 14:08:44 UTC 17,733 bytes, 337 lines download raw bytes

1(()=>{const e=document.querySelectorAll(".coblocks-animate");if("IntersectionObserver"in window){const t=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&(e.target.classList.add(e.target.dataset.coblocksAnimation),t.unobserve(e.target))}))}),{threshold:[.15]});e.forEach((e=>{t.observe(e)}))}else e.forEach((e=>{e.classList.remove("coblocks-animate"),delete e.dataset.coblocksAnimation}))})();;
2/**
3 * Makes "skip to content" link work correctly in IE9, Chrome, and Opera
4 * for better accessibility.
5 *
6 * @link http://www.nczonline.net/blog/2013/01/15/fixing-skip-to-content-links/
7 */
8
9 ( function() {
10	var isWebkit = navigator.userAgent.toLowerCase().indexOf( 'webkit' ) > -1,
11		isOpera  = navigator.userAgent.toLowerCase().indexOf( 'opera' )  > -1,
12		isIE     = navigator.userAgent.toLowerCase().indexOf( 'msie' )   > -1;
13
14	if ( ( isWebkit || isOpera || isIE ) && document.getElementById && window.addEventListener ) {
15		window.addEventListener( 'hashchange', function() {
16			var id = location.hash.substring( 1 ),
17				element;
18
19			if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) {
20				return;
21			}
22
23			element = document.getElementById( id );
24
25			if ( element ) {
26				if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) {
27					element.tabIndex = -1;
28				}
29
30				element.focus();
31
32				// Repositions the window on jump-to-anchor to account for admin bar and border height.
33				window.scrollBy( 0, -53 );
34			}
35		}, false );
36	}
37} )();
38;
39/* global screenReaderText */
40/**
41 * Theme functions file.
42 *
43 * Contains handlers for navigation and widget area.
44 */
45( function () {
46	'use strict';
47
48	var mainNav, masthead, menuToggle, siteNavigation, socialNavigation, siteHeaderMenu, resizeTimer;
49
50	function matches( el, sel ) {
51		if ( Element.prototype.matches ) {
52			return el.matches( sel );
53		}
54
55		if ( Element.prototype.msMatchesSelector ) {
56			return el.msMatchesSelector( sel );
57		}
58	}
59
60	// Based on https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Polyfill
61	function closest( el, sel ) {
62		if ( el.closest ) {
63			return el.closest( sel );
64		}
65
66		var current = el;
67
68		do {
69			if ( matches( el, sel ) ) {
70				return current;
71			}
72			current = current.parentElement || current.parentNode;
73		} while ( current !== null && current.nodeType === 1 );
74
75		return null;
76	}
77
78	function forEachNode( parent, selector, fn ) {
79		var nodes = parent.querySelectorAll( selector );
80		for ( var i = 0; i < nodes.length; i++ ) {
81			fn( nodes[ i ] );
82		}
83	}
84
85	function initMainNavigation( container ) {
86		forEachNode( container, '.menu-item-has-children > a', function ( el ) {
87			// Add dropdown toggle that displays child menu items.
88			var dropdownToggle = document.createElement( 'button' );
89			dropdownToggle.className = 'dropdown-toggle';
90			dropdownToggle.setAttribute( 'aria-expanded', 'false' );
91
92			var span = document.createElement( 'span' );
93			span.className = 'screen-reader-text';
94			span.textContent = screenReaderText.expand;
95
96			dropdownToggle.appendChild( span );
97
98			el.parentNode.insertBefore( dropdownToggle, el.nextSibling );
99		} );
100
101		// Toggle buttons and submenu items with active children menu items.
102		forEachNode( container, '.current-menu-ancestor > button', function ( el ) {
103			el.classList.add( 'toggled-on' );
104		} );
105		forEachNode( container, '.current-menu-ancestor > .sub-menu', function ( el ) {
106			el.classList.add( 'toggled-on' );
107		} );
108
109		// Add menu items with submenus to aria-haspopup="true".
110		forEachNode( container, '.menu-item-has-children', function ( el ) {
111			el.setAttribute( 'aria-haspopup', 'true' );
112		} );
113
114		forEachNode( container, '.dropdown-toggle', function ( el ) {
115			el.addEventListener( 'click', function ( e ) {
116				var screenReaderSpan = el.querySelector( '.screen-reader-text' );
117
118				e.preventDefault();
119				el.classList.toggle( 'toggled-on' );
120				var next = el.nextElementSibling;
121				if ( next && matches( next, '.children, .sub-menu' ) ) {
122					next.classList.toggle( 'toggled-on' );
123				}
124
125				el.setAttribute(
126					'aria-expanded',
127					el.getAttribute( 'aria-expanded' ) === 'false' ? 'true' : 'false'
128				);
129				screenReaderSpan.textContent =
130					screenReaderSpan.textContent === screenReaderText.expand ? screenReaderText.collapse: screenReaderText.expand;
131			} );
132		} );
133	}
134
135	mainNav = document.querySelector( '.main-navigation' );
136	if ( mainNav ) {
137		initMainNavigation( mainNav );
138	}
139
140	masthead = document.querySelector( '#masthead' );
141	menuToggle = masthead && masthead.querySelector( '#menu-toggle' );
142	siteHeaderMenu = masthead && masthead.querySelector( '#site-header-menu' );
143	siteNavigation = masthead && masthead.querySelector( '#site-navigation' );
144	socialNavigation = masthead && masthead.querySelector( '#social-navigation' );
145
146	// Enable menuToggle.
147	( function () {
148		// Return early if menuToggle is missing.
149		if ( ! menuToggle ) {
150			return;
151		}
152
153		var controls = [ menuToggle, siteNavigation, socialNavigation ].filter( Boolean );
154
155		// Add an initial values for the attribute.
156		controls.forEach( function ( el ) {
157			el.setAttribute( 'aria-expanded', 'false' );
158		} );
159
160		menuToggle.addEventListener( 'click', function () {
161			menuToggle.classList.toggle( 'toggled-on' );
162			siteHeaderMenu.classList.toggle( 'toggled-on' );
163
164			var newVal = menuToggle.getAttribute( 'aria-expanded' ) === 'false' ? 'true' : 'false';
165			controls.forEach( function ( el ) {
166				el.setAttribute( 'aria-expanded', newVal );
167			} );
168		} );
169	} )();
170
171	// Fix sub-menus for touch devices and better focus for hidden submenu items for accessibility.
172	( function () {
173		if ( ! siteNavigation || ! siteNavigation.children.length ) {
174			return;
175		}
176
177		// Init `focus` class to allow submenu access on tablets.
178		function initFocusClassTouchScreen() {
179			document.body.addEventListener( 'touchstart', function ( e ) {
180				if ( ! closest( e.target, '.main-navigation li' ) ) {
181					forEachNode( document, '.main-navigation li', function ( el ) {
182						el.classList.remove( 'focus' );
183					} );
184				}
185			} );
186			forEachNode( siteNavigation, '.menu-item-has-children > a', function ( link ) {
187				link.addEventListener( 'touchstart', function ( e ) {
188					if ( window.innerWidth >= 910 ) {
189						var el = link.parentElement;
190
191						if ( matches( el, 'li' ) && ! el.classList.contains( 'focus' ) ) {
192							e.preventDefault();
193							el.classList.toggle( 'focus' );
194							var children = el.parentElement.children;
195							for ( var i = 0; i < children.length; i++ ) {
196								if ( children[ i ] !== el ) {
197									children[ i ].classList.remove( 'focus' );
198								}
199							}
200						}
201					}
202				} );
203			} );
204		}
205
206		function toggleFocus( el ) {
207			var item = closest( el, '.menu-item' );
208			if ( item ) {
209				item.classList.toggle( 'focus' );
210			}
211		}
212
213		if ( 'ontouchstart' in window ) {
214			initFocusClassTouchScreen();
215		}
216
217		forEachNode( siteNavigation, 'a', function ( link ) {
218			link.addEventListener( 'focus', toggleFocus( link ) );
219			link.addEventListener( 'blur', toggleFocus( link ) );
220		} );
221	} )();
222
223	// Add the default ARIA attributes for the menu toggle and the navigations.
224	function onResizeARIA() {
225		if ( window.innerWidth < 910 ) {
226			if ( menuToggle && menuToggle.classList.contains( 'toggled-on' ) ) {
227				menuToggle.setAttribute( 'aria-expanded', 'true' );
228			} else {
229				menuToggle.setAttribute( 'aria-expanded', 'false' );
230			}
231
232			if ( siteHeaderMenu && siteHeaderMenu.classList.contains( 'toggled-on' ) ) {
233				siteNavigation && siteNavigation.setAttribute( 'aria-expanded', 'true' );
234				socialNavigation && socialNavigation.setAttribute( 'aria-expanded', 'true' );
235			} else {
236				siteNavigation && siteNavigation.setAttribute( 'aria-expanded', 'false' );
237				socialNavigation && socialNavigation.setAttribute( 'aria-expanded', 'false' );
238			}
239
240			menuToggle && menuToggle.setAttribute( 'aria-controls', 'site-navigation social-navigation' );
241		} else {
242			menuToggle && menuToggle.removeAttribute( 'aria-expanded' );
243			siteNavigation && siteNavigation.removeAttribute( 'aria-expanded' );
244			socialNavigation && socialNavigation.removeAttribute( 'aria-expanded' );
245			menuToggle && menuToggle.removeAttribute( 'aria-controls' );
246		}
247	}
248
249	// Add 'below-entry-meta' class to elements.
250	function belowEntryMetaClass( selector ) {
251		if (
252			document.body.classList.contains( 'page' ) ||
253			document.body.classList.contains( 'search' ) ||
254			document.body.classList.contains( 'single-attachment' ) ||
255			document.body.classList.contains( 'error404' )
256		) {
257			return;
258		}
259
260		forEachNode( document, '.entry-content', function ( content ) {
261			forEachNode( content, selector, function ( element ) {
262				var elementPosTop = element.getBoundingClientRect().top;
263				var article = closest( element, 'article' );
264				var entryFooter = article && article.querySelector( '.entry-footer' );
265				var entryFooterPosBottom =
266					entryFooter ? entryFooter.getBoundingClientRect().top + entryFooter.offsetHeight + 28	: null;
267				var caption = closest( element, 'figure' );
268				var next = element.nextSibling;
269				var figcaption = next && matches( next, 'figcaption' ) ? next : null;
270				var newImg;
271
272				// Add 'below-entry-meta' to elements below the entry meta.
273				if ( entryFooterPosBottom !== null && elementPosTop > entryFooterPosBottom ) {
274					// Check if full-size images and captions are larger than or equal to 840px.
275					if ( selector === 'img.size-full' || selector === '.wp-block-image img' ) {
276						// Create an image to find native image width of resized images (i.e. max-width: 100%).
277						newImg = new Image();
278						newImg.src = element.getAttribute( 'src' );
279						newImg.onload = function () {
280							if ( newImg.width >= 840 ) {
281								// Check if an image in an image block has a width attribute; if its value is less than 840, return.
282								if (
283									selector === '.wp-block-image img' &&
284									element.hasAttribute( 'width' ) &&
285									element.getAttribute( 'width' ) < 840
286								) {
287									return;
288								}
289
290								element.classList.add( 'below-entry-meta' );
291
292								if ( caption && caption.classList.contains( 'wp-caption' ) ) {
293									caption.classList.add( 'below-entry-meta' );
294									caption.removeAttribute( 'style' );
295								}
296
297								if ( figcaption ) {
298									figcaption.classList.add( 'below-entry-meta' );
299								}
300							}
301						};
302					} else {
303						element.classList.add( 'below-entry-meta' );
304					}
305				} else {
306					element.classList.remove( 'below-entry-meta' );
307					caption && caption.classList.remove( 'below-entry-meta' );
308				}
309			} );
310		} );
311	}
312
313	function init() {
314		window.addEventListener( 'load', onResizeARIA );
315		window.addEventListener( 'resize', function () {
316			clearTimeout( resizeTimer );
317			resizeTimer = setTimeout( function () {
318				belowEntryMetaClass( 'img.size-full' );
319				belowEntryMetaClass( 'blockquote.alignleft, blockquote.alignright' );
320				belowEntryMetaClass( '.wp-block-image img' );
321			}, 300 );
322			onResizeARIA();
323		} );
324
325		belowEntryMetaClass( 'img.size-full' );
326		belowEntryMetaClass( 'blockquote.alignleft, blockquote.alignright' );
327		belowEntryMetaClass( '.wp-block-image img' );
328	}
329
330	if ( document.readyState === 'loading' ) {
331		document.addEventListener( 'DOMContentLoaded', init );
332	} else {
333		init();
334	}
335} )();
336;
337(()=>{var e=[],t=!1,n=2e3,i=[],o=new Promise(e=>{"loading"!==document.readyState?e():window.addEventListener("DOMContentLoaded",()=>e())});function s(e,t){if("string"==typeof e)try{e=JSON.parse(e)}catch{return}if(t&&"function"==typeof t.postMessage)try{t.postMessage(JSON.stringify({type:"likesMessage",data:e}),"*")}catch{}}function r(){const t=[];document.querySelectorAll("div.jetpack-likes-widget-unloaded").forEach(n=>{if(!(e.indexOf(n.id)>-1)&&d(n)){e.push(n.id);var i,o=/like-(post|comment)-wrapper-(\d+)-(\d+)-(\w+)/.exec(n.id);o&&5===o.length&&(i={blog_id:o[2],width:n.width},"post"===o[1]?i.post_id=o[3]:"comment"===o[1]&&(i.comment_id=o[3]),i.obj_id=o[4],t.push(i))}}),t.length>0&&s({event:"initialBatch",requests:t},window.frames["likes-master"])}function a(){const e=document.querySelector("#likes-other-gravatars");if(e){e.style.display="none",e.setAttribute("aria-hidden","true");const t=e.__resizeHandler;t&&(window.removeEventListener("resize",t),delete e.__resizeHandler)}}function l(){var e;if(!t)return s({event:"queryMasterReady"},window.frames["likes-master"]),void setTimeout(l,500);!function(){for(let e=i.length-1;e>=0;e--){const t=i[e];if(!d(t)){const n=t&&t.parentElement&&t.parentElement.parentElement;n.classList.remove("jetpack-likes-widget-loaded"),n.classList.remove("jetpack-likes-widget-loading"),n.classList.add("jetpack-likes-widget-unloaded");const o=n.querySelector(".likes-widget-placeholder");o&&(o.style.display=""),i.splice(e,1),t.remove()}}}(),function(){if(!g)return;document.querySelectorAll("div.jetpack-likes-widget-unloaded").forEach(e=>g.observe(e))}();var n=[...document.querySelectorAll("div.jetpack-likes-widget-unloaded")].filter(e=>d(e));n.length>0&&r();for(var o=0,a=n.length;o<=a-1;o++)(e=n[o].id)&&c(e)}function c(e){if(void 0===e)return;const t=document.querySelector("#"+e);t.querySelectorAll("iframe").forEach(e=>e.remove());const n=t.querySelector(".likes-widget-placeholder");if(n&&n.classList.contains("post-likes-widget-placeholder")){const e=document.createElement("iframe");e.classList.add("post-likes-widget","jetpack-likes-widget"),e.name=t.dataset.name,e.src=t.dataset.src,e.height="55px",e.width="100%",e.frameBorder="0",e.scrolling="no",e.title=t.dataset.title,n.after(e)}if(n.classList.contains("comment-likes-widget-placeholder")){const e=document.createElement("iframe");e.class="comment-likes-widget-frame jetpack-likes-widget-frame",e.name=t.dataset.name,e.src=t.dataset.src,e.height="18px",e.width="100%",e.frameBorder="0",e.scrolling="no",t.querySelector(".comment-like-feedback").after(e),i.push(e)}t.classList.remove("jetpack-likes-widget-unloaded"),t.classList.add("jetpack-likes-widget-loading"),t.querySelector("iframe").addEventListener("load",e=>{t.contains(e.target)&&(s({event:"loadLikeWidget",name:e.target.name,width:e.target.width},window.frames["likes-master"]),n&&(n.style.display="none"),t.classList.remove("jetpack-likes-widget-loading"),t.classList.add("jetpack-likes-widget-loaded"))})}function d(e){const t=e.getBoundingClientRect().top,i=e.getBoundingClientRect().bottom;return t+n>=0&&i<=window.innerHeight+n}window.addEventListener("message",function(e){let n=e&&e.data;if("string"==typeof n)try{n=JSON.parse(n)}catch{return}const i=n&&n.type,l=n&&n.data;if("likesMessage"!==i||void 0===l.event)return;if("https://widgets.wp.com"===e.origin)switch(l.event){case"masterReady":o.then(()=>{t=!0;const e={event:"injectStyles"},n=document.querySelector(".sd-text-color"),i=document.querySelector(".sd-link-color"),o=n&&getComputedStyle(n)||{},a=i&&getComputedStyle(i)||{};document.body.classList.contains("single")&&s({event:"reblogsEnabled"},window.frames["likes-master"]),e.textStyles={color:o.color,fontFamily:o["font-family"],fontSize:o["font-size"],direction:o.direction,fontWeight:o["font-weight"],fontStyle:o["font-style"],textDecoration:o["text-decoration"]},e.linkStyles={color:a.color,fontFamily:a["font-family"],fontSize:a["font-size"],textDecoration:a["text-decoration"],fontWeight:a["font-weight"],fontStyle:a["font-style"]},s(e,window.frames["likes-master"]),r()});break;case"showLikeWidget":case"showCommentLikeWidget":break;case"killCommentLikes":document.querySelectorAll(".jetpack-comment-likes-widget-wrapper").forEach(e
337=>e.remove());break;case"clickReblogFlair":wpcom_reblog&&"function"==typeof wpcom_reblog.toggle_reblog_box_flair&&wpcom_reblog.toggle_reblog_box_flair(l.obj_id);break;case"hideOtherGravatars":a();break;case"showOtherGravatars":{const e=document.querySelector("#likes-other-gravatars");if(!e)break;const t=e.querySelector("ul");e.style.display="none",t.innerHTML="",e.querySelectorAll(".likes-text span").forEach(e=>e.textContent=l.totalLikesLabel),(l.likers||[]).forEach(async(e,n)=>{if("http"!==e.profile_URL.substr(0,4))return;const i=document.createElement("li");t.append(i);const o=encodeURI(e.profile_URL),r=encodeURI(e.avatar_URL);i.innerHTML=`<a href="${o}" rel="nofollow" target="_parent" class="wpl-liker">\n\t\t\t\t\t\t<img src="${r}"\n\t\t\t\t\t\t\talt=""\n\t\t\t\t\t\t\tstyle="width: 28px; height: 28px;" />\n\t\t\t\t\t\t<span></span>\n\t\t\t\t\t</a>`,i.classList.add(e.css_class),i.querySelector("img").alt=l.avatarAltTitle.replace("%s",e.name),i.querySelector("span").innerText=e.name,n===l.likers.length-1&&i.addEventListener("keydown",e=>{"Tab"!==e.key||e.shiftKey||(e.preventDefault(),a(),s({event:"focusLikesCount",parent:l.parent},window.frames["likes-master"]))})});const n=function(){const t="rtl"===getComputedStyle(e).direction,n=document.querySelector(`*[name='${l.parent}']`),i=n.getBoundingClientRect(),o=n.ownerDocument.defaultView,s=i.top+o.pageYOffset,r=i.left+o.pageXOffset;let a;if(e.style.top=s+l.position.top-1+"px",t){const t=l&&l.likers?Math.min(l.likers.length,5):0;a=r+l.position.left+24*t+4,e.style.transform="translateX(-100%)"}else a=r+l.position.left;e.style.left=a+"px",e.style.left="-9999px",e.style.display="block";const c=e.offsetWidth;a+c>o.innerWidth&&(a=i.right-c),e.style.left=a+"px",e.setAttribute("aria-hidden","false")};n(),e.focus();const i=function(e,t){var n;return function(){var i=this,o=arguments;clearTimeout(n),n=setTimeout(function(){e.apply(i,o)},t)}},o=i(n,100);e.__resizeHandler=o,window.addEventListener("resize",o),e.focus()}}}),document.addEventListener("click",a);var f,m,u,p=(f=250,m=l,function(){clearTimeout(u),u=setTimeout(m,f)}),g="function"==typeof IntersectionObserver?new IntersectionObserver(p,{rootMargin:"2000px",threshold:[0,1]}):null;l(),window.addEventListener("scroll",p,!0)})();;

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.