PageSourceSearch

https://multiversesite.com/_static/??-eJyNzssKwjAQQNEfsh2E0sdC/BTJ…/zZSODdeDRvuim3E4+vv6XZd1m3apnlePwNbRTs=

js multiversesite.com collected 2026-10-02 13:29:35 UTC 13,195 bytes, 214 lines download raw bytes

1/**
2 * Theme functions file.
3 *
4 * Contains handlers for navigation, accessibility, header sizing
5 * footer widgets and Featured Content slider
6 *
7 */
8( function( $ ) {
9	var body    = $( 'body' ),
10		_window = $( window ),
11		nav, button, menu;
12
13	nav = $( '#primary-navigation' );
14	button = nav.find( '.menu-toggle' );
15	menu = nav.find( '.nav-menu' );
16
17	// Enable menu toggle for small screens.
18	( function() {
19		if ( ! nav.length || ! button.length ) {
20			return;
21		}
22
23		// Hide button if menu is missing or empty.
24		if ( ! menu.length || ! menu.children().length ) {
25			button.hide();
26			return;
27		}
28
29		button.on( 'click.twentyfourteen', function() {
30			nav.toggleClass( 'toggled-on' );
31			if ( nav.hasClass( 'toggled-on' ) ) {
32				$( this ).attr( 'aria-expanded', 'true' );
33				menu.attr( 'aria-expanded', 'true' );
34			} else {
35				$( this ).attr( 'aria-expanded', 'false' );
36				menu.attr( 'aria-expanded', 'false' );
37			}
38		} );
39	} )();
40
41	/*
42	 * Makes "skip to content" link work correctly in IE9 and Chrome for better
43	 * accessibility.
44	 *
45	 * @link http://www.nczonline.net/blog/2013/01/15/fixing-skip-to-content-links/
46	 */
47	_window.on( 'hashchange.twentyfourteen', function() {
48		var hash = location.hash.substring( 1 ), element;
49
50		if ( ! hash ) {
51			return;
52		}
53
54		element = document.getElementById( hash );
55
56		if ( element ) {
57			if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) {
58				element.tabIndex = -1;
59			}
60
61			element.focus();
62
63			// Repositions the window on jump-to-anchor to account for header height.
64			window.scrollBy( 0, -80 );
65		}
66	} );
67
68	$( function() {
69		// Search toggle.
70		$( '.search-toggle' ).on( 'click.twentyfourteen', function( event ) {
71			var that    = $( this ),
72				wrapper = $( '#search-container' ),
73				container = that.find( 'a' );
74
75			that.toggleClass( 'active' );
76			wrapper.toggleClass( 'hide' );
77
78			if ( that.hasClass( 'active' ) ) {
79				container.attr( 'aria-expanded', 'true' );
80			} else {
81				container.attr( 'aria-expanded', 'false' );
82			}
83
84			if ( that.is( '.active' ) || $( '.search-toggle .screen-reader-text' )[0] === event.target ) {
85				wrapper.find( '.search-field' ).focus();
86			}
87		} );
88
89		/*
90		 * Fixed header for large screen.
91		 * If the header becomes more than 48px tall, unfix the header.
92		 *
93		 * The callback on the scroll event is only added if there is a header
94		 * image and we are not on mobile.
95		 */
96		if ( _window.width() > 781 ) {
97			var mastheadHeight = $( '#masthead' ).height(),
98				toolbarOffset, mastheadOffset;
99
100			if ( mastheadHeight > 48 ) {
101				body.removeClass( 'masthead-fixed' );
102			}
103
104			if ( body.is( '.header-image' ) ) {
105				toolbarOffset  = body.is( '.admin-bar' ) ? $( '#wpadminbar' ).height() : 0;
106				mastheadOffset = $( '#masthead' ).offset().top - toolbarOffset;
107
108				_window.on( 'scroll.twentyfourteen', function() {
109					if ( _window.scrollTop() > mastheadOffset && mastheadHeight < 49 ) {
110						body.addClass( 'masthead-fixed' );
111					} else {
112						body.removeClass( 'masthead-fixed' );
113					}
114				} );
115			}
116		}
117
118		// Focus styles for menus.
119		$( '.primary-navigation, .secondary-navigation' ).find( 'a' ).on( 'focus.twentyfourteen blur.twentyfourteen', function() {
120			$( this ).parents().toggleClass( 'focus' );
121		} );
122	} );
123
124	/**
125	 * Add or remove ARIA attributes.
126	 *
127	 * Uses jQuery's width() function to determine the size of the window and add
128	 * the default ARIA attributes for the menu toggle if it's visible.
129	 *
130	 * @since Twenty Fourteen 1.4
131	 */
132	function onResizeARIA() {
133		if ( 781 > _window.width() ) {
134			button.attr( 'aria-expanded', 'false' );
135			menu.attr( 'aria-expanded', 'false' );
136			button.attr( 'aria-controls', 'primary-menu' );
137		} else {
138			button.removeAttr( 'aria-expanded' );
139			menu.removeAttr( 'aria-expanded' );
140			button.removeAttr( 'aria-controls' );
141		}
142	}
143
144	_window
145		.on( 'load.twentyfourteen', onResizeARIA )
146		.on( 'resize.twentyfourteen', function() {
147			onResizeARIA();
148	} );
149
150	_window.on( 'load', function() {
151		var footerSidebar,
152			isCustomizeSelectiveRefresh = ( 'undefined' !== typeof wp && wp.customize && wp.customize.selectiveRefresh );
153
154		// Arrange footer widgets vertically.
155		if ( typeof $.fn.masonry === 'function' ) {
156			footerSidebar = $( '#footer-sidebar' );
157			footerSidebar.masonry( {
158				itemSelector: '.widget',
159				columnWidth: function( containerWidth ) {
160					return containerWidth / 4;
161				},
162				gutterWidth: 0,
163				isResizable: true,
164				isRTL: $( 'body' ).is( '.rtl' )
165			} );
166
167			if ( isCustomizeSelectiveRefresh ) {
168
169				// Retain previous masonry-brick initial position.
170				wp.customize.selectiveRefresh.bind( 'partial-content-rendered', function( placement ) {
171					var copyPosition = (
172						placement.partial.extended( wp.customize.widgetsPreview.WidgetPartial ) &&
173						placement.removedNodes instanceof jQuery &&
174						placement.removedNodes.is( '.masonry-brick' ) &&
175						placement.container instanceof jQuery
176					);
177					if ( copyPosition ) {
178						placement.container.css( {
179							position: placement.removedNodes.css( 'position' ),
180							top: placement.removedNodes.css( 'top' ),
181							left: placement.removedNodes.css( 'left' )
182						} );
183					}
184				} );
185
186				// Re-arrange footer widgets after selective refresh event.
187				wp.customize.selectiveRefresh.bind( 'sidebar-updated', function( sidebarPartial ) {
188					if ( 'sidebar-3' === sidebarPartial.sidebarId ) {
189						footerSidebar.masonry( 'reloadItems' );
190						footerSidebar.masonry( 'layout' );
191					}
192				} );
193			}
194		}
195
196		// Initialize audio and video players in Twenty_Fourteen_Ephemera_Widget widget when selectively refreshed in Customizer.
197		if ( isCustomizeSelectiveRefresh && wp.mediaelement ) {
198			wp.customize.selectiveRefresh.bind( 'partial-content-rendered', function() {
199				wp.mediaelement.initialize();
200			} );
201		}
202
203		// Initialize Featured Content slider.
204		if ( body.is( '.slider' ) ) {
205			$( '.featured-content' ).featuredslider( {
206				selector: '.featured-content-inner > article',
207				controlsContainer: '.featured-content'
208			} );
209		}
210	} );
211} )( jQuery );
212;
213!function(e){var n=function(){var e,n,t,d;"undefined"!=typeof FB&&FB.XFBML?FB.XFBML.parse():((e=document.createElement("div")).id="fb-root",document.getElementsByTagName("body")[0].appendChild(e),n="//connect.facebook.net/"+jpfbembed.locale+"/sdk.js#xfbml=1",jpfbembed.appid&&(n+="&appId="+jpfbembed.appid),n+="&version=v2.3",(t=document.createElement("script")).setAttribute("src",n),(d=document.querySelector("script")).parentNode.insertBefore(t,d))};e.fbAsyncInit=function(){FB.init({appId:jpfbembed.appid,version:"v2.3"}),FB.XFBML.parse()},"undefined"!=typeof infiniteScroll&&document.body.addEventListener("post-load",n),n()}(window);;
214(()=>{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
214=>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.