PageSourceSearch

https://www.caparol.de/typo3conf/ext/theme_caparol/Resources/Publi…/wdvs-shorturl-tabs.js?1789111195

js caparol.de collected 2026-09-24 09:33:00 UTC 1,765 bytes, 51 lines download raw bytes

1(function() {
2    var hash = window.location.hash;
3    var tabModule = document.querySelector('#caparolTabs, .tx-tabaccordioncontent');
4	if (!tabModule) return;
5    var tabs = tabModule.querySelectorAll('.nav-tabs li a');
6    
7    (function shortUrlTabNav() {
8        if (hash) {
9			console.log(hash)
10            var tabIndex = hash.replace('#tab', '') - 1;
11            tabs[tabIndex].click();
12        }
13    })();
14})();
15
16(function tabAccordionScrollIntoView() {
17    if (!window.jQuery) return;
18    var $ = window.jQuery;
19    var reduceMotion = window.matchMedia && window.matchMedia('(prefers-reduced-motion: reduce)').matches;
20
21    function headerOffset() {
22        var nav = document.querySelector('.navbar-fixed-top');
23        return (nav ? nav.getBoundingClientRect().height : 0) + 170;
24    }
25
26    function scrollTo($target) {
27        if (!$target.length) return;
28        var top = $target.offset().top - headerOffset();
29        if (reduceMotion) {
30            window.scrollTo(0, top);
31        } else {
32            $('html, body').animate({ scrollTop: top }, 400);
33        }
34    }
35
36    var userInitiated = false;
37    $(document).on('mousedown touchstart keydown', '.tx-tabaccordioncontent [data-toggle="tab"], .tx-tabaccordioncontent [data-toggle="collapse"]', function () {
38        userInitiated = true;
39    });
40
41    $(document).on('shown.bs.tab', '.tx-tabaccordioncontent [data-toggle="tab"]', function (e) {
42        if (!userInitiated) return;
43        userInitiated = false;
44        scrollTo($($(e.target).attr('href')));
45    });
46    $(document).on('shown.bs.collapse', '.tx-tabaccordioncontent .panel-collapse', function (e) {
47        if (!userInitiated) return;
48        userInitiated = false;
49        scrollTo($(e.target).closest('.panel'));
50    });
51})();

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.