PageSourceSearch

https://visiteastlothian.org/wp-content/plugins/ic-itinerary/assets/js/custom-js.js?ver=7.1.2

js visiteastlothian.org collected 2026-09-26 07:05:13 UTC 2,440 bytes, 79 lines download raw bytes

1function genPDF(sender) {
2    try {
3        jQuery('.no-print').hide();
4        var element = document.getElementsByClassName('itinerary-table')[0];
5        html2pdf(element, {
6            margin: 0,
7            filename: 'my-itinerary.pdf',
8            image: {type: 'jpeg', quality: 0.95},
9            html2canvas: {scale: 1, logging: true, useCORS: true},
10            jsPDF: {unit: 'in', format: 'a4', orientation: 'p'},
11        });
12    } finally {
13        setTimeout(function() {
14            jQuery('.no-print').show();
15        },1000);
16    }
17}
18
19function copytoClipboard(inp) {
20    jQuery(inp).html('Copied');
21    navigator.clipboard.writeText(jQuery(inp).attr('data-text'));
22
23}
24
25jQuery('body').on('click', '.add-to',function() {
26    let thisId = jQuery(this).attr('data-id');
27    let newCookie=[];
28
29    currCookie = JSON.parse(getCookie('vel_itinerary'));
30    if(currCookie == null) {
31        newCookie.push(thisId);
32    } else {
33        newCookie = currCookie;
34        if(!newCookie.includes(thisId)) {
35            newCookie.push(thisId);
36        }
37    }
38
39
40    jQuery(this).toggleClass(['remove-from','add-to']).html('Remove From Itinerary');
41    setCookie('vel_itinerary', JSON.stringify(newCookie), { expires : 30, sameSite: 'lax', secure: true });
42	jQuery('#div_block-963-34').show();
43});
44
45jQuery('body').on('click', '.remove-from',function() {
46    if(jQuery(this).hasClass('btn') || confirm('Are you sure?')) {
47    let thisId = jQuery(this).attr('data-id');
48    let newCookie=[];
49
50
51    currCookie = JSON.parse(getCookie('vel_itinerary'));
52    const index = currCookie.indexOf(thisId);
53    if (index > -1) {
54        currCookie.splice(index, 1);
55    }
56
57    if(jQuery(this).hasClass('btn-primary')) {
58        jQuery(this).toggleClass(['remove-from','add-to']).html('Add to Itinerary');
59    } else {
60        jQuery('[data-post-id='+jQuery(this).closest('tr').attr('data-post-id')+']').remove();
61        setTimeout(function() {
62
63            jQuery('#section-40-452').css('background-image','url("'+jQuery('table').find('img')[0].src + '")');
64        },200);
65    }
66    if(newCookie.length === 0) {
67		deleteCookie('vel_itinerary');
68		jQuery('#div_block-963-34').hide();
69	} else {
70    	setCookie('vel_itinerary', JSON.stringify(currCookie), { expires : 10,samesite: true });
71	}
72    }
73});
74
75
76jQuery( document ).ready(function() {
77    jQuery('#section-40-452').css('background-image','url("'+jQuery('table').find('img')[0].src + '")');
78	
79});

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.