PageSourceSearch

https://di-re.org/assets/di-re.org/wp-content/plugins/addons-for-v…/accordion/js/accordion-30f337fc57.js

js di-re.org collected 2026-10-05 18:38:07 UTC 3,985 bytes, 155 lines download raw bytes

1var _____WB$wombat$assign$function_____=function(name){return (globalThis._wb_wombat && globalThis._wb_wombat.local_init && globalThis._wb_wombat.local_init(name))||globalThis[name];};if(!globalThis.__WB_pmw){globalThis.__WB_pmw=function(obj){this.__WB_source=obj;return this;}}{
2let window = _____WB$wombat$assign$function_____("window");
3let self = _____WB$wombat$assign$function_____("self");
4let document = _____WB$wombat$assign$function_____("document");
5let location = _____WB$wombat$assign$function_____("location");
6let top = _____WB$wombat$assign$function_____("top");
7let parent = _____WB$wombat$assign$function_____("parent");
8let frames = _____WB$wombat$assign$function_____("frames");
9let opener = _____WB$wombat$assign$function_____("opener");
10jQuery(function ($) {
11
12    // Don't do any of this if there are no accordions present here
13    if ($('.lvca-accordion').length) {
14
15        $('.lvca-accordion').each(function () {
16
17            var accordion = $(this);
18
19            new LVCA_Accordion(accordion);
20
21        });
22    }
23
24});
25
26var LVCA_Accordion = function (accordion) {
27
28    // toggle elems
29    this.panels = accordion.find('.lvca-panel');
30
31    this.toggle = false;
32
33    this.expanded = false;
34
35    if (accordion.data('toggle') == true)
36        this.toggle = true;
37
38    if (accordion.data('expanded') == true)
39        this.expanded = true;
40
41    this.current = null;
42
43    // init events
44    this.initEvents();
45};
46
47LVCA_Accordion.prototype.show = function (panel) {
48
49    if (this.toggle) {
50        if (panel.hasClass('lvca-active')) {
51            this.close(panel);
52        }
53        else {
54            this.open(panel);
55        }
56    }
57    else {
58        // if the panel is already open, close it else open it after closing existing one
59        if (panel.hasClass('lvca-active')) {
60            this.close(panel);
61            this.current = null;
62        }
63        else {
64            this.close(this.current);
65            this.open(panel);
66            this.current = panel;
67        }
68    }
69
70};
71
72LVCA_Accordion.prototype.close = function (panel) {
73
74    if (panel !== null) {
75        panel.children('.lvca-panel-content').slideUp(300);
76        panel.removeClass('lvca-active');
77    }
78
79};
80
81LVCA_Accordion.prototype.open = function (panel) {
82
83    if (panel !== null) {
84        panel.children('.lvca-panel-content').slideDown(300);
85        panel.addClass('lvca-active');
86    }
87
88};
89
90
91LVCA_Accordion.prototype.initEvents = function () {
92
93    var self = this;
94
95    if (this.expanded && this.toggle) {
96
97        // Display all panels
98        this.panels.each(function () {
99
100            var panel = jQuery(this);
101
102            self.show(panel);
103
104        });
105    }
106
107    this.panels.find('.lvca-panel-title').click(function (event) {
108
109        event.preventDefault();
110
111        var $panel = jQuery(this).parent();
112
113        // Do not disturb existing location URL if you are going to close an accordion panel that is currently open
114        if (!$panel.hasClass('lvca-active')) {
115
116            var target = $panel.attr("id");
117
118            history.pushState ? history.pushState(null, null, "#" + target) : window.location.hash = "#" + target;
119
120        }
121        else {
122            var target = $panel.attr("id");
123
124            if (window.location.hash == '#' + target)
125                history.pushState ? history.pushState(null, null, '#') : window.location.hash = "#";
126        }
127
128        self.show($panel);
129
130    });
131};
132
133
134}
135
136/*
137     FILE ARCHIVED ON 05:02:34 May 20, 2023 AND RETRIEVED FROM THE
138     INTERNET ARCHIVE ON 12:06:46 Aug 06, 2026.
139     JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE.
140
141     ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C.
142     SECTION 108(a)(3)).
143*/
144/*
145playback timings (ms):
146  captures_list: 0.423
147  exclusion.robots: 0.042
148  exclusion.robots.policy: 0.035
149  esindex: 0.006
150  cdx.remote: 15.583
151  LoadShardBlock: 68.311 (3)
152  PetaboxLoader3.datanode: 60.458 (4)
153  PetaboxLoader3.resolve: 61.296 (2)
154  load_resource: 56.592
155*/

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.