PageSourceSearch

https://ww3.tlig.org/wp-content/includes/js/functions.tligcustom.js?ver=1789640246

js tlig.org collected 2026-10-02 06:56:00 UTC 26,918 bytes, 689 lines download raw bytes

1/********************
2* Show and hide div *
3*********************/
4function showDiv(action, divContent, divButton, divClose, inLine) {
5    if ( inLine == 'inline') { IL = 'inline' } else { IL = 'block' };
6    if ( action == 'open' ) {
7        jQuery('#' + divContent ).css('display', IL);
8        jQuery('#' + divButton ).css('display', 'none');
9        jQuery('#' + divClose ).css('display', 'block'); }
10    else {
11        jQuery('#' + divContent ).css('display', 'none');
12        jQuery('#' + divButton ).css('display', 'block');
13        jQuery('#' + divClose ).css('display', 'none');
14        jQuery('html, body').animate({
15            scrollTop: 0
16        }, 1000);
17    }
18}
19
20/*************************************************
21*  Bible References for Messages - TLIG
22*  Invoque php file to access Bible database table
23*  Using Ajax
24**************************************************/
25
26//  global vars
27var resultBib = new Array();
28
29function BRefGet(book, chpt, vrsI, vrsE, occurenceBible, fntNum) {
30
31    var xRef;
32    var x = 1;
33
34    // if only one versicle, copy the first to last
35    if (vrsE == null)
36        vrsE = vrsI;
37
38    xRef = book + " " + chpt + ":" + vrsI;
39    if (vrsE != vrsI)
40        xRef = xRef + "-" + vrsE;
41
42    if (occurenceBible == null) {  // if a bible reference link has been clicked
43        if (!fnBottomClicked) {    // display bible quote only if we clicked on a link in the tooltip
44            ilTipo[fntNum].setContent(resultBib[xRef]);
45        }
46    }
47    else {					// when opening a message the bible tooltips are created
48        jQuery.ajax({
49            type: "POST",
50            url: "/wp-admin/admin-ajax.php",
51            data: {
52                action: 'bibRef', // load function hooked to: see add_action('wp_ajax_bibRef'... in functions.php
53                book: book,
54                chapter: chpt,
55                vIni: vrsI,
56                vEnd: vrsE,
57                langCurrent: document.documentElement.lang,
58            },
59            success: function (data) {
60                console.log('xref = ' + xRef);
61                console.log('data = ' + data);
62                HTMLQuote = fmtBibleRef(xRef, data);
63                tippy(occurenceBible, {
64                    content: HTMLQuote,
65                    animateFill: false,
66                    onShown: function (tip) {
67                        fnBottomClicked = true;  // True if we clicked on a Bible quote at the bottom of the Footnotes.
68                    },
69                });
70                resultBib[xRef] = HTMLQuote;	 // save the content in array with the reference as key
71            }
72        });
73    }
74    x++;
75}
76
77/* formats the hint to show the bible quote */
78function fmtBibleRef(s_ref, s_text) {
79
80    if (s_text.length > 500) {
81        return "<table cellpadding=5 style='width='100%'><tr><td align=left><IMG style='width: 102px; HEIGHT: 76px' alt='' hspace=0 src='/wp-content/includes/images/global/msg/Bible2.gif' align=right border=0><I><font face='arial,helvetica' size='-1'>Biblical reference :</I></font><HR ALIGN='left' SIZE='1' WIDTH='150'><font face='arial,helvetica'><font size='-1'><b>" + s_ref + "</b><br><br><div style='padding:5px; width:100%; height:180px; font-size: 12px; overflow:auto;'  align='justify'>" + s_text + "</div></font></td></tr></table>"
82    }
83    else {
84        return "<table cellpadding=5 style='width='100%'><tr><td align=left><IMG style='width: 102px; HEIGHT: 76px' alt='' hspace=0 src='/wp-content/includes/images/global/msg/Bible2.gif' align=right border=0><I><font face='arial,helvetica' size='-1'>Biblical reference :</I></font><HR ALIGN='left' SIZE='1' WIDTH='150'><font face='arial,helvetica'><font size='-1'><b>" + s_ref + "</b><br><br><div style='font-size: 12px;' align='justify'>" + s_text + "</div></font></td></tr></table>"
85    }
86}
87
88/* show the footnote (old function no more valid) */
89function ftRef(b) {
90
91    return;
92}
93
94/*****************************************************
95* Retrieve Vassula's meeting by year and/or by country
96******************************************************/
97function meeting_get(year, country, lang) {
98
99    // display 
100    jQuery('#meeting_div').html('<div style="text-align: center;"><img src="/wp-contact/includes/images/loading.gif"></div>');
101
102    jQuery.ajax({
103        type: "POST",
104        url: "/wp-admin/admin-ajax.php",
105        data: {
106            action: 'meeting_search', // load function hooked to: see add_action('wp_ajax_meeting_search'... in functions.php
107            year: year,
108            country: country,
109            lang: lang,
110        },
111        success: function (data) {
112            jQuery('#meeting_div').html(data);
113            history.pushState(null, null, '?y=' + year + '&c=' + country);
114        },
115        error: function (xhr) {
116            jQuery('#meeting_div').html('Request Status: ' + xhr.status + ' Status Text: ' + xhr.statusText + ' ' + xhr.responseText);
117        }
118    });
119};
120
121/****************************
122* Retrieve the Event's report
123*****************************/
124function retrieve_report(postID, where, permalink) {
125
126    console.log(' postID + where = ', postID, where);
127
128    jQuery('#reportModalContent-' + where).html('<div style="text-align: center;"><img src="/wp-content/includes/images/loading.gif"></div>');
129    console.log('postID du report = ' + postID);
130    jQuery.ajax({
131        type: "POST",
132        url: "/wp-admin/admin-ajax.php",
133        data: {
134            action: 'report_retrieve',
135            postID: postID,
136        },
137        success: function (data) {
138            jQuery('#reportModalContent-' + where).html(data);
139            // jQuery('#modalOpenLink').attr('href', '/?page_id=' + postID);
140            jQuery('#modalOpenLink').attr('href', '/' + permalink );
141        },
142        error: function (xhr) {
143            jQuery('#reportModalContent-' + where).html('Request Status: ' + xhr.status + ' Status Text: ' + xhr.statusText + ' ' + xhr.responseText);
144        },
145    });
146}
147
148/******************************************************
149* Retrieve a certain Post and fill the modal window ***
150*******************************************************/
151function retrieve_post_modal( postID, fromID, where, permalink ) {
152
153    jQuery('#postModalContent-' + where).html('<div style="text-align: center;"><img src="/wp-content/includes/images/loading.gif"></div>');
154
155    console.log( 'passa par retrieve_post_modal ');
156
157    jQuery.ajax({
158        type: "POST",
159        url: "/wp-admin/admin-ajax.php",
160        data: {
161            action: 'post_retrieve_modal',
162            postID: postID,
163            fromID: fromID,
164        },
165        success: function (data) {
166            console.log('content = ', data);
167            jQuery('#postModalContent-' + where).html(data);    
168            createFootnotes();
169            //jQuery('#modalOpenLink').attr('href', '/' + lang + '/?page_id=' + postID);
170            if ( permalink != undefined ) {
171                jQuery('#modalOpenLink').attr('href', '/' + permalink + '?pageid=' + fromID );
172            }
173        },
174        error: function (xhr) {
175            jQuery('#postModalContent-' + where).html('Request Status: ' + xhr.status + ' Status Text: ' + xhr.statusText + ' ' + xhr.responseText);
176        },
177    });
178}
179
180/*************************************
181* Retrieve Articles for the unity page
182**************************************/
183function retrieve_unity_page() {
184
185    jQuery('#unityPageModalContent').html('<div style="text-align: center;"><img src="/wp-content/includes/images/loading.gif"></div>');
186
187    jQuery.ajax({
188        type: "POST", url: "/wp-admin/admin-ajax.php",
189        data: {
190            action: 'unity_page_retrieve',
191            currentLang: currentLanguage, 
192        },
193        success: function (data) { jQuery('#unityPageModalContent').html(data); },
194    });
195}
196
197/************************************
198*** Retrieve a specific post page ***
199*************************************/
200function retrieve_post(postID, postParentID, destElement, callback) {
201
202    elementRef = destElement == '' ? '#divReferenceID' : '#' + destElement;
203    jQuery(elementRef).html('<div style="text-align: center;"><img src="/wp-content/includes/images/loading.gif"></div>');
204
205    console.log( 'passa par retrieve_post ');
206    jQuery.ajax({
207        type: "POST",
208        url: "/wp-admin/admin-ajax.php",
209        data: {
210            action: 'post_retrieve',
211            postID: postID,
212            postParentID: postParentID,
213            destElement: destElement,
214        },
215        success: function (data) {
216            jQuery(elementRef).html(data);
217            console.log('success');
218
219            if (callback != undefined) {
220                callback();
221                console.log('callback');
222            }
223            console.log('fin de ajax');
224        },
225    });
226}
227
228/*****************************************
229* Retrieve News by Year and/or by Category
230******************************************/
231function news_get(year_news, category_news, page_news, number_news) {
232
233    //	alert( year + " " + category + " " + page + " " + number );
234
235    jQuery('#news_div').html('<div style="text-align: center;"><img src="/wp-content/includes/images/loading.gif"></div>');
236
237    jQuery.ajax({
238        type: "POST",
239        url: "/wp-admin/admin-ajax.php",
240        data: {
241            action: 'searchNews', // load function hooked to: see add_action('wp_ajax_meeting_search'... in functions.php
242            year_news: year_news,
243            category_news: category_news,
244            page_news: page_news,
245            number_news: number_news,
246        },
247        success: function (data) {
248            jQuery('#news_div').html(data);
249            history.pushState(null, null, '?yr=' + year_news + '&ct=' + category_news + '&pg=' + page_news);
250        },
251        error: function () {
252            jQuery('#news_div').html('Error in news retrieve !');
253        }
254    });
255}
256
257function news_select_cat(theCat) {
258    jQuery("#category_dropdown").val(theCat);
259    var pos = document.getElementById("category_dropdown").selectedIndex;
260    var oHandler1 = jQuery("#category_dropdown").msDropdown().data("dd");
261    oHandler1.set("selectedIndex", pos);
262}
263
264/*****************************************************
265/* Verify that the Message with a specific date exists 
266/*****************************************************/
267function date_validate(the_form) {
268
269    document.getElementById("sidebar_goto_form")
270    var the_date = document.getElementById("sidebar_goto_form").elements.namedItem("sliding_date").value;
271
272    // Get address bar without the name of the message
273    adrBar = document.location.href;
274    var divide = adrBar.split('/');
275    var adrRoot = "";
276    for (i = 0; i < divide.length - 2; i++) {
277        adrRoot += divide[i] + "/";
278    }
279
280    // call ajax verification if the message exists
281    jQuery.ajax({
282        type: "POST",
283        url: "/wp-admin/admin-ajax.php",
284        data: {
285            action: 'verify_message', // load function hooked to: "wp_ajax_*" action hook
286            the_date: the_date,
287        },
288        success: function (data) {
289            if (data != 'not found') {
290                document.getElementById("sidebar_goto_form").elements.namedItem("address").value = adrRoot + data;
291                document.getElementById("sidebar_goto_form").submit();
292            }
293            else {
294                alert('Not found');
295            }
296        }
297    });
298}
299
300function accordion(evt, year, month) {
301
302    var i, tabcontent, tablinks;
303
304    if (month == null) { // if click on year
305
306        theClass = evt.className;
307        yearOn = theClass.search("active");  // Search if the year is active
308
309        if (yearOn != -1) { // if active
310
311            // close days panel
312            dayPanel = document.querySelectorAll('[class^="accordionDays' + year + '"]');
313            for (i = 0; i < dayPanel.length; i++) {
314                dayPanel[i].style.maxHeight = null;
315            }
316
317            // close months panel
318            monthPanel = document.querySelector('.accordionMonths' + year);
319            monthPanel.style.maxHeight = null;
320            monthPanel.style.display = "none";
321            //			monthPanel.className = monthPanel.className.replace(" active", "");
322
323            monthLink = document.querySelectorAll('[class^="month' + year + '"]');
324            for (i = 0; i < monthLink.length; i++) {
325                monthLink[i].className = monthLink[i].className.replace(" active", "");
326            }
327        }
328
329        // Get all elements begining with class="accordionMonths" and hide them
330        tabcontent = document.querySelectorAll('[class^="accordionMonths"]');
331        for (i = 0; i < tabcontent.length; i++) {
332            tabcontent[i].style.maxHeight = null;
333            tabcontent[i].style.display = "none";
334        }
335        // Get all elements begining with class="accordionDays" and hide them
336        tabcontent = document.querySelectorAll('[class^="accordionDays"]');
337        for (i = 0; i < tabcontent.length; i++) {
338            tabcontent[i].style.maxHeight = null;
339            tabcontent[i].style.display = "none";
340        }
341
342        // Get all elements with class="month" and remove the class "active"
343        monthLinks = document.querySelectorAll('[class^="month"]');
344        for (i = 0; i < monthLinks.length; i++) {
345            monthLinks[i].className = monthLinks[i].className.replace(" active", "");
346        }
347
348        // Get all elements with class="accordionYear" and remove the class "active"
349        tablinks = document.querySelectorAll('.accordionYear');
350        for (i = 0; i < tablinks.length; i++) {
351            tablinks[i].className = tablinks[i].className.replace(" active", "");
352        }
353
354        if (yearOn == -1) { // if class "active" wasn't found
355            monthPanel = document.querySelector('.accordionMonths' + year);
356            monthPanel.style.display = "flex";
357            monthPanel.style.maxHeight = "100%";
358            //			monthPanel.style.maxHeight = monthPanel.scrollHeight + "px";
359            monthPanel.style.marginBottom = "50px";
360            evt.className += " active";
361        }
362    }
363    else {
364
365        theClass = evt.className;
366        monthOn = theClass.search("active");
367
368        // Get all elements begining with class="accordionDays" and hide them
369        tabcontent = document.querySelectorAll('[class^="accordionDays"]');
370        for (i = 0; i < tabcontent.length; i++) {
371            tabcontent[i].style.maxHeight = null;
372            tabcontent[i].style.display = "none";
373        }
374
375        // Get all elements with class="month" and remove the class "active"
376        tablinks = document.querySelectorAll('.month' + year);
377        for (i = 0; i < tablinks.length; i++) {
378            tablinks[i].className = tablinks[i].className.replace(" active", "");
379        }
380
381        // Show the current tab, and add an "active" class to the button that opened the tab
382        if (monthOn == -1) { // if not found class "active"
383            monthPanel = document.querySelector('.accordionMonths' + year); // reduce margin-bottom of block of months to 10px
384            monthPanel.style.marginBottom = "10px";
385
386            monthPanel = document.querySelector('.accordionDays' + year + month);
387            monthPanel.style.display = "table";
388            monthPanel.style.maxHeight = monthPanel.scrollHeight + "px";
389            evt.className += " active";
390        }
391        else {
392            monthPanel = document.querySelector('.accordionMonths' + year); // change margin-bottom of block of months to 50px
393            monthPanel.style.marginBottom = "50px";
394        }
395    }
396}
397
398function accordion_recent(evt, year) {
399
400    var i;
401
402    theClass = evt.className;
403    yearOn = theClass.search("active");
404
405    // Get all elements begining with class="accordionListDays" and hide them
406    var tabcontent = document.querySelectorAll('[class^="accordionDays"]');
407    for (i = 0; i < tabcontent.length; i++) {
408        tabcontent[i].style.maxHeight = null;
409        tabcontent[i].style.display = "none";
410    }
411
412    // Get all elements with class="accordionYear" and remove the class "active"
413    var tablinks = document.querySelectorAll('.accordionYear');
414    for (i = 0; i < tablinks.length; i++) {
415        tablinks[i].className = tablinks[i].className.replace(" active", "");
416    }
417
418    // Show the current tab, and add an "active" class to the button that opened the tab
419    if (yearOn == -1) { // if not found class "active"
420        daysPanel = document.querySelector('.accordionDays' + year);
421        daysPanel.style.display = "block";
422        //		daysPanel.style.maxHeight = daysPanel.scrollHeight + "px";
423        daysPanel.style.maxHeight = "100%";
424        evt.className += " active";
425    }
426}
427
428function accordion_prayer(theme) {
429
430    var i;
431
432    // Search if the clicked theme has already an active status
433    tagPanel = document.querySelector('[class^="prayersBlockDiv_' + theme + '"]');
434    theClass = tagPanel.className;
435    yearOn = theClass.search("active");
436
437    // Get all elements with class="prayersBlockDiv_" and hide them. Remove class "active"
438    var tabcontent = document.querySelectorAll('[class^="prayersBlockDiv_"]');
439    for (i = 0; i < tabcontent.length; i++) {
440        tabcontent[i].style.display = "none";
441        tabcontent[i].className = tabcontent[i].className.replace(" active", "");
442    }
443
444    // Show the clicked theme if it was active
445    if (yearOn == -1) { // if not found class "active"
446        tagsPanel = document.querySelector('[class="prayersBlockDiv_' + theme + '"]');
447        tagsPanel.style.display = "block";
448        tagsPanel.className += " active";
449    }
450}
451
452function accordion_prayer2(theme) {
453
454    var i;
455
456    //	if ( theme == null ) {
457    //		return;
458    //	}
459
460    var tabcontent = document.querySelectorAll('[class^="prayersBlockDiv2_"]');
461    for (i = 0; i < tabcontent.length; i++) {
462        tabcontent[i].style.display = "none";
463    }
464
465    if (theme != null) {
466        tagsPanel = document.querySelector('[class="prayersBlockDiv2_' + theme + '"]');
467        tagsPanel.style.display = "block";
468    }
469    else {
470        //		tagsPanel = document.querySelector('[class="prayersBlockDiv2_'  + theme + '"]');
471        //		tagsPanel.style.display = "none";
472    }
473}
474
475/*************************
476/* Load more ajax call *** 
477/*************************/
478function load_more_news(pagination) {
479
480    //alert(pagination);
481
482    // Display first the loading wheel and loading message
483    jQuery('#loadallMessage').text('Loading all News...');
484    jQuery('#loadMoreMessage').css('display', 'hide');
485    jQuery('#loadingWheel').css('display', 'block');
486
487    // call ajax display more news
488    jQuery.ajax({
489        type: "POST",
490        url: "/wp-admin/admin-ajax.php",
491        data: {
492            action: 'load_more', // load function hooked to: "wp_ajax_*" action hook
493            number_of_posts: pagination,
494            page_nbr: pagination_number,
495        },
496        success: function (data) {
497            // Hide the loading wheel
498            jQuery('#loadingWheel').css('display', 'none');
499            history.pushState(null, null, '?page=' + pagination_number);
500            pagination_number++;
501
502            jQuery("#newsContainer").append(data);
503        }
504    });
505}
506
507/*******************************************************
508*  Display or not the text (display = block or none) div
509********************************************************/
510function swapTextOn(divNumber) {
511    document.getElementById("unityText" + divNumber).style.display = "block";
512}
513function swapTextOff(divNumber) {
514    document.getElementById("unityText" + divNumber).style.display = "none";
515}
516
517/****************************************************************************
518*  Resize Vassula's Meetings dropdown and add mobile according to screen size
519*****************************************************************************/
520function resize_dropdown() {
521    // resize dropdown list section
522    var largeur = jQuery(document).width(); // width of the screen
523    if (largeur <= 1200 && largeur > 400) {
524        theScale = 0.6 + ((largeur - 650) * 0.4 / 550);
525    }
526    else {
527        theScale = 1;
528    }
529    jQuery('#dropdownSquare').css('transform', 'scale(' + theScale + ')');
530}
531
532function add_mobile() {
533    // add class 'mobile' to manage in css the smartphone design
534    var largeur = jQuery(document).width(); // width of the screen
535    if (largeur < 401) {
536        jQuery('#header, #meeting_div').addClass('mobile');
537    }
538    else {
539        jQuery('#header').removeClass('mobile');
540    }
541}
542
543/*******************************************************************************
544* Display page from sidebar menu (About Vassula or The approach of my Angel) ***
545********************************************************************************/
546function display_menu_text(the_div) {
547    jQuery("#pageMenu-textblock").children().each(function () {
548        jQuery(this).css("display", "none");
549    });
550    jQuery(".pageMenu-menu").children().each(function () {
551        jQuery(this).children().removeClass('on').addClass('off');
552    });
553    jQuery("#pageMenu-" + the_div).css("display", "block");
554    jQuery("html, body").animate({ scrollTop: 0 }, 1000);
555    jQuery("#" + the_div).removeClass('off').addClass('on');
556    // add the_div at the end of the url
557    history.pushState(null, null, '?linkTo=' + the_div);
558}
559
560/*****************************************************
561* Display photos and videos galleries from sidebar ***
562******************************************************/
563function display_hide_gallery(gal1, gal2) {
564    jQuery('#' + gal1 + '-galleries').css({ "display": "block" });
565    jQuery('#' + gal1).removeClass('off').addClass('on');
566    jQuery('#' + gal2 + '-galleries').css({ "display": "none" });
567    jQuery('#' + gal1 + '-submenu').css({ "display": "block" });
568    jQuery('#' + gal2).removeClass('on').addClass('off');
569    jQuery('#' + gal2 + '-submenu').css({ "display": "none" });
570    jQuery('html, body').animate({
571        scrollTop: 0
572    }, 1000);
573}
574
575/********************************************
576* Jump to a specific position in the page ***
577*********************************************/
578function jump_to_page_pos(anc) {
579    document.querySelector('#' + anc).scrollIntoView({
580        behavior: 'smooth'
581    });
582}
583
584/***********************************************************
585* Generate a e-mail address to hide email from spam bots ***
586************************************************************/
587//function gen_mail_to_link( left, right ) {
588//	document.write("<a href=\"mailto");
589//	document.write(":" + left + "@");
590//	document.write(right + "\">" + left + "@" + right + "<\/a>");
591//}
592
593/*********************************
594* Verify e-mail address format ***
595**********************************/
596function validateEmail(mailAddress) {
597    var re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
598    return re.test(mailAddress);
599}
600
601/*******************************************************************
602* Send E-mail to webteam from Form (Feedback / Download Messages ***
603********************************************************************/
604function formSendEmail(Subject, Name, EmailTo, Message, Att) {
605
606    jQuery.ajax({
607        type: "POST",
608        url: "/wp-admin/admin-ajax.php",
609        data: {
610            action: 'form_email', // load function hooked to: see add_action('wp_ajax_form_email'... in functions.php
611            formSubject: Subject,
612            formName: Name,
613            formEmailTo: EmailTo,
614            formMessage: Message,
615            formAtt: Att,
616        },
617        success: function (data) {
618            console.log(' resultat = ' + data);
619        },
620    });
621
622}
623
624/*********************************
625* Verify e-mail address format ***
626**********************************/
627function searchDisplayChoice(all_cat, searchCriteriaBox) {
628    theDisplay = all_cat == 'all' ? 'none' : 'block';
629    jQuery('.searchcriteria' + searchCriteriaBox).css({ "display": theDisplay });
630}
631
632/**********************************
633* GET title and content of post ***
634***********************************/
635function getArticleContent(postID, postParentID, destElement, callback) {
636    retrieve_post(postID, postParentID, destElement, callback);
637    jQuery('#myModal').modal();
638}
639
640/********************************************************************
641* MODIFY THE FOOTNOTE REFERENCE RETURN AND CONTENT NUMBER         ***
642* (useful when more messages with footnotes are in the same page) *** 
643*********************************************************************/
644function modify_footnotes_reference(ref, attribute, suffixe) {
645    jQuery(ref).each(function () {
646        href = jQuery(this).attr(attribute);
647        jQuery(this).attr(attribute, href.replace("fn", "fnModified" + suffixe));
648    });
649}
650function modify_footnotes_return(ret, attribute, suffixe) {
651    jQuery(ret).each(function () {
652        theName = jQuery(this).attr(attribute);
653        jQuery(this).attr(attribute, theName.replace("ret", "Modified" + suffixe + "ret"));
654    });
655}
656(function() {
657  document.addEventListener('click', function(e) {
658    var quoteLink = e.target.closest('.bib-quote-link');
659    // only '#id' links; javascript:BRefGet / data-ref links are handled in jquery.tligcustom.js
660    if (quoteLink && (quoteLink.getAttribute('href') || '').charAt(0) === '#') {
661        e.preventDefault();
662        var id = quoteLink.getAttribute('href').substring(1);
663        showQuote(id);
664    }
665    var closeButton = e.target.closest('[data-close-bref]');
666    if (closeButton) {
667        e.preventDefault();
668        var id = closeButton.getAttribute('data-close-bref');
669        hideQuote(id);
670    }	  
671  });
672  function showQuote(id) {
673      // Hide all other bref toasts first? Or allow multiple?
674      // The requirement doesn't specify, but usually one at a time is better for toasts if they overlap.
675      document.querySelectorAll('.bib-quote').forEach(el => el.classList.remove('visible'));
676
677      var el = document.getElementById(id);
678      if (el) {
679          el.classList.add('visible');
680      }
681  }
682  window.hideQuote = function (id) {
683      var el = document.getElementById(id);
684      if (el) {
685          el.classList.remove('visible');
686      }
687  }
688})();
689

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.