PageSourceSearch

https://earlham.edu/wp-content/themes/earlham_1_2/ec.js?ver=1790215190

js earlham.edu collected 2026-09-24 15:17:01 UTC 1,231 bytes, 52 lines download raw bytes

1/**
2 * Template Name: Earlham JS
3 * Description: Custom JS code by EC.
4 *
5 */
6
7(function( $ ) {
8 
9    //"use strict";
10     
11    $( document ).ready(function() {
12    	console.log( "EC JS ON" );
13		
14		//expand stackable accordions when page is printed	
15$(window).on('beforeprint', function () {
16    // Find all <summary> elements that act as accordion headers
17    $('summary').each(function () {
18        var $summary = $(this);
19        var $details = $summary.parent('details');
20
21        // If the <details> element is not open, simulate a click to open it
22        if (!$details.prop('open')) {
23            $summary.click();
24        }
25    });
26    console.log( "EC Stackable Accordions open on print" );
27});
28		
29		console.log( "EC JS OFF" );
30		
31	}); //END OF DOC READY
32
33
34
35 
36})(jQuery); 
37
38
39window.addEventListener('beforeprint', function () {
40
41    console.log('Before print event triggered');
42
43    // Find all <summary> elements that act as accordion headers
44    var summaries = document.querySelectorAll('summary');
45
46    // Simulate a click on each <summary> to expand it
47    summaries.forEach(function (summary) {
48        if (summary.parentNode && summary.parentNode.open === false) {
49            summary.click();
50        }
51    });
52});

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.