PageSourceSearch

https://www.thisisdarkness.com/wp-content/themes/lovecraft/js/global.js?ver=6.1.14

js thisisdarkness.com collected 2026-09-24 09:41:55 UTC 2,563 bytes, 103 lines download raw bytes

1jQuery(document).ready(function($) {
2	
3	
4	// Toggle mobile-menu
5	$(".nav-toggle").on("click", function(){	
6		$(this).toggleClass("active");
7		$(".mobile-menu").slideToggle();
8		if ($(".search-toggle").hasClass("active")) {
9			$(".search-toggle").removeClass("active");
10			$(".mobile-search").slideToggle();
11		}
12		return false;
13	});
14	
15	
16	// Toggle mobile-search
17	$(".search-toggle").on("click", function(){	
18		$(this).toggleClass("active");
19		$(".mobile-search").slideToggle();
20		if ($(".nav-toggle").hasClass("active")) {
21			$(".nav-toggle").removeClass("active");
22			$(".mobile-menu").slideToggle();
23		}
24		return false;
25	});
26	
27	
28	// Hide/show mobile menu/search block > 900
29	$(window).resize(function() {
30		if ($(window).width() > 1000) {
31			$(".toggle").removeClass("active");
32			$(".mobile-menu").hide();
33			$(".mobile-search").hide();
34		}
35	});	
36	
37	
38	// Dropdown menus on touch devices
39	$( '.main-menu li:has(ul)' ).doubleTapToGo();
40    
41        			
42	// resize videos after container
43	var vidSelector = ".post iframe, .post object, .post video, .widget-content iframe, .widget-content object, .widget-content iframe";	
44	var resizeVideo = function(sSel) {
45		$( sSel ).each(function() {
46			var $video = $(this),
47				$container = $video.parent(),
48				iTargetWidth = $container.width();
49
50			if ( !$video.attr("data-origwidth") ) {
51				$video.attr("data-origwidth", $video.attr("width"));
52				$video.attr("data-origheight", $video.attr("height"));
53			}
54
55			var ratio = iTargetWidth / $video.attr("data-origwidth");
56
57			$video.css("width", iTargetWidth + "px");
58			$video.css("height", ( $video.attr("data-origheight") * ratio ) + "px");
59		});
60	};
61
62	resizeVideo(vidSelector);
63
64	$(window).resize(function() {
65		resizeVideo(vidSelector);
66	});
67    
68	
69	// When Jetpack Infinite scroll posts have loaded
70	$( document.body ).on( 'post-load', function () {
71
72		var $container = $('.posts');
73		$container.masonry( 'reloadItems' );
74		
75		$blocks.imagesLoaded(function(){
76			$blocks.masonry({
77				itemSelector: '.post-container'
78			});
79	
80			// Fade blocks in after images are ready (prevents jumping and re-rendering)
81			$(".post-container").fadeIn();
82		});
83		
84		// Rerun video resizing
85		resizeVideo(vidSelector);
86		
87		$container.masonry( 'reloadItems' );
88		
89		// Load Flexslider
90	    $(".flexslider").flexslider({
91	        animation: "slide",
92	        controlNav: false,
93	        prevText: "Previous",
94	        nextText: "Next",
95	        smoothHeight: true   
96	    });
97		
98		$(document).ready( function() { setTimeout( function() { $blocks.masonry(); }, 500); });
99
100	});
101	
102	
103});

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.