PageSourceSearch

https://www.journalreview.com/js/site.js

js journalreview.com collected 2026-10-03 20:23:17 UTC 2,336 bytes, 89 lines download raw bytes

1function mobileSubnav(el){
2	if( el.data('toggled') ){
3		$('.mobile-subnav-item-'+el.data('navitem')).hide();
4		el.removeClass('fa-minus').addClass('fa-plus');
5		el.data('toggled',false);
6	}else{
7		$('.mobile-subnav-item-'+el.data('navitem')).show();
8		el.removeClass('fa-plus').addClass('fa-minus');
9		el.data('toggled',true);
10	}
11}
12
13function weightedRandom(prob) {
14  let i, sum=0, r=Math.random();
15  for (i in prob) {
16    sum += prob[i];
17    if (r <= sum) return i;
18  }
19}
20
21// Viewport adjustments
22$(function(){
23
24	// Desktop
25	if( Math.max(document.documentElement.clientWidth, window.innerWidth || 0) >= 728 ){
26		$('.mobile-only').each(function(){
27			if( $(this).closest('.pk-layer').find('.box').length == 1 ){
28				$(this).closest('.pk-layer').remove();
29			}else if( $(this).closest('.railitem').find('.box').length == 1 ){
30				$(this).closest('.railitem').remove();
31			}
32			$(this).remove();
33		});
34	}
35
36	// Mobile
37	if( Math.max(document.documentElement.clientWidth, window.innerWidth || 0) < 728 ){
38		$('.desktop-only').each(function(){
39			if( $(this).closest('.pk-layer').find('.box').length == 1 ){
40				$(this).closest('.pk-layer').remove();
41			}else if( $(this).closest('.railitem').find('.box').length == 1 ){
42				$(this).closest('.railitem').remove();
43			}
44			$(this).remove();
45		});
46	}
47
48});
49
50/* Adjust header if weather sponsor present */
51window.setTimeout(function(){
52	var img = $('.wx-sponsor').find('img');
53	if( img.length >= 2 ){
54        
55		$('.wx-sponsor').addClass('loaded');
56		$('.weather.conditions').addClass('sponsored');
57    $('.nameplate').addClass('w-sponsor');
58    $('.search-col').addClass('w-sponsor');
59
60  }
61}, 1000);
62
63/* Constant Contact Modal */
64
65  // Get the modal
66var modal = document.getElementById("myModal");
67
68// Get the button that opens the modal
69var btn = document.getElementById("obitCCBtn");
70
71// Get the <span> element that closes the modal
72var span = document.getElementsByClassName("close")[0];
73
74// When the user clicks on the button, open the modal
75btn.onclick = function() {
76  modal.style.display = "block";
77}
78
79// When the user clicks on <span> (x), close the modal
80span.onclick = function() {
81  modal.style.display = "none";
82}
83
84// When the user clicks anywhere outside of the modal, close it
85window.onclick = function(event) {
86  if (event.target == modal) {
87    modal.style.display = "none";
88  }
89}

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.