PageSourceSearch

https://www.therecorderonline.com/wp-content/themes/dolores/assets/js/lastload_injector.js

js therecorderonline.com collected 2026-10-02 07:48:31 UTC 4,183 bytes, 132 lines download raw bytes

1jQuery(function lastLoadInjector($) {
2	console.log('lastload');
3	$(document).ready(function() {
4		/*$('.content-wrapper').ready(function() {
5			var link = document.createElement("link");
6			link.href = "/wp-content/themes/dolores/assets/styles/lastload_stylesheet.css";
7			link.type = "text/css";
8			link.rel = "stylesheet";
9			document.getElementsByTagName("head")[0].appendChild(link);
10		})*/
11		//Memberpress set default country
12		$('#mepr-address-country').val('US');
13		$('#mepr-address-country').change();
14		var windowbig=true
15		var flyout = $('.oht-menu-container--flyout')
16		adminbar_fixes()
17		adminOverlap()
18		hamburgerler()
19		$( window ).resize(function() {
20			hamburgerler()
21			adminOverlap() 
22		})
23		
24		function adminOverlap(){
25			if($('#wpadminbar').length > 0 &&  $(window).width() < 783){
26			    $('#wpadminbar').css('height', '42px')
27				$('#wpadminbar').css('margin-top', '-7px')
28				if($('.oht-menu--clem').length > 0 || $('.oht-menu--ford').length > 0){ 
29					$('#wpadminbar').css('position', 'fixed')
30				}
31				
32			}
33			if($('#wpadminbar').length > 0 &&  $(window).width() > 783){
34				$('#wpadminbar').css('height', '32px')
35				$('#wpadminbar').css('margin-top', '0px')
36				
37			}
38		}
39		function hamburgerler (){
40			if($(window).width() < 1024) {
41				$('.hamburger-text').remove()
42				if(windowbig==true){
43					adminbar_fixes()
44				}
45				 windowbig = false
46				 
47			}
48			if($(window).width() > 1024) {
49				if(windowbig ==false){
50					$('.hamburger-text-anch').before( '<div class="hamburger-text">Menu</div>')
51					windowbig=true
52				}
53			}
54		}
55		function adminbar_fixes(){
56			if($('#wpadminbar').length > 0){
57				flyout.css('margin-top','20px')
58			}
59		}
60		
61	})
62	
63})
64jQuery(".oht-slider").click(function (event) {
65	event.preventDefault();
66	event.stopImmediatePropagation();
67	if (jQuery(".oht-aa-link:hover").length != 0) {
68	  console.log("hit it!");
69	  window.location.href = jQuery(".oht-aa-link:hover").attr("href");
70	}
71  });
72  
73  jQuery(document).ready(function() {
74    // Function to determine if the color is light or dark
75    function isLight(color) {
76        var r, g, b, hsp;
77        // Check the format of the color, HEX or RGB?
78        if (color.match(/^rgb/)) {
79            // If RGB --> store the red, green, blue values in separate variables
80            color = color.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*\d+)?\)$/);
81            r = parseInt(color[1], 10);
82            g = parseInt(color[2], 10);
83            b = parseInt(color[3], 10);
84        } else {
85            // If hex --> Convert it to RGB
86            color = +("0x" + color.slice(1).replace( 
87            color.length < 5 && /./g, '$&$&'));
88            r = color >> 16;
89            g = color >> 8 & 255;
90            b = color & 255;
91        }
92        // HSP equation from http://alienryderflex.com/hsp.html
93        hsp = Math.sqrt(
94        0.299 * (r * r) +
95        0.587 * (g * g) +
96        0.114 * (b * b)
97        );
98        // Using the HSP value, determine whether the color is light or dark
99        return hsp > 127.5;
100    }
101
102    // Function to get the computed background color
103    function getComputedBackgroundColor(elem) {
104        var bgColor = "";
105        while (elem) {
106            if (elem.tagName === "HTML") {
107                // Fallback color if no background color is found
108                return "white";
109            }
110            bgColor = window.getComputedStyle(elem).backgroundColor;
111            if (bgColor !== "rgba(0, 0, 0, 0)" && bgColor !== "transparent") {
112                break;
113            }
114            elem = elem.parentElement;
115        }
116        return bgColor;
117    }
118
119    // Iterate over each .footer-container element
120    jQuery('.footer-container').each(function() {
121        var backgroundColor = getComputedBackgroundColor(this);
122        // console.log("Computed Background Color: ", backgroundColor); // Logging the computed color
123        // Add 'light' or 'dark' class based on the background color
124        if (isLight(backgroundColor)) {
125            // console.log('light');
126            jQuery(this).addClass('footer-light');
127        } else {
128            console.log('dark');
129            jQuery(this).addClass('footer-dark');
130        }
131    });
132});

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.