PageSourceSearch

https://www.pcwebplus.nl/phpbb/ext/phpbb/collapsiblecategories/sty…ollapsiblecategories.js?assets_version=1230

js pcwebplus.nl collected 2026-09-24 18:12:42 UTC 1,102 bytes, 52 lines download raw bytes

1(function($) { // Avoid conflicts with other libraries
2
3	'use strict';
4
5	// Get the collapsible element (has class .topiclist.forums OR .collapsible)
6	$.fn.getCollapsible = function() {
7		return this.closest('.fora-bg').find('ol').eq(0);
8	};
9
10	$('a.collapse-btn').each(function() {
11		var $this = $(this),
12			hidden = $this.attr('data-hidden'),
13			$content = $this.getCollapsible();
14
15		// Return if no collapsible content could be found
16		if (!$content.length) {
17			return;
18		}
19
20		// Unhide the collapse buttons (makes them JS dependent)
21		$this.show();
22
23		// Hide hidden forums on load
24		if (hidden) {
25			$content.hide();
26		}
27
28		if ($this.hasClass('collapse-show')) {
29			$this
30				.closest('.fora-bg')
31				.toggleClass('fora-bg-hidden')
32			;
33		}
34	});
35
36	phpbb.addAjaxCallback('phpbb_collapse', function(res) {
37		if (res.success) {
38			$(this)
39				.toggleClass('collapse-show collapse-hide')
40				.getCollapsible()
41				.stop(true, true)
42				.slideToggle('fast')
43			;
44
45			$(this)
46				.closest('.fora-bg')
47				.toggleClass('fora-bg-hidden')
48			;
49		}
50	});
51
52})(jQuery); // Avoid conflicts with other libraries

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.