PageSourceSearch

https://mysavvastraining.com/assets/for-theme/2018b-copy/js/native/modal-leaving-site-logix.js

js mysavvastraining.com collected 2026-10-01 12:40:54 UTC 886 bytes, 21 lines download raw bytes

1const modalElem = document.getElementById('departureModal');
2if ( modalElem ) {
3	//const modalObj = new bootstrap.Modal(modalElem); // for bs5+
4	const departureLinks = document.querySelectorAll('.departure'); // for older bs3
5	departureLinks.forEach(departure => {
6		departure.addEventListener('click', function handleClick(event) {
7			let hrefVal = departure.getAttribute('href');
8			let modalLeaveBtn = modalElem.querySelector('.external-link');
9			/* if ( !confirm('You are about to leave this site. Click \'OK\' to proceed')) {
10				event.preventDefault();
11			} */
12			event.preventDefault();
13			modalLeaveBtn.addEventListener('click', function closeModal(e) {
14				$('#departureModal').modal('hide');
15			});
16			modalLeaveBtn.setAttribute('href', hrefVal);
17			//modalObj.toggle(); // for bs v5+
18			$('#departureModal').modal('toggle'); // for older bs3
19		});
20	});
21}

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.