PageSourceSearch

https://www.neuchatelville.ch/typo3temp/assets/compressed/tc_tabs-…0caa17e73b1092a6df2a59c7f99b1.js?1783607243

js neuchatelville.ch collected 2026-10-02 05:13:29 UTC 2,167 bytes, 72 lines download raw bytes

1/**
2 * Gestionnaire des onglets boostrap
3 * @type {tabManager}
4 */
5(function ($) {
6
7
8    $.fn.TCTabs = function (options) {
9
10    if ($('.tabbable').find('.tab-pane').length == 0) return false;
11        var opts = $.extend({}, $.fn.TCTabs.defaults, options);
12
13        /**
14         * Retourne l'élément de l'onglet par hash avec l'id généré depuis TYPO3
15         */
16        function getTabPerTypo3Hash() {
17            var objectId = window.location.hash;
18            var tabId = $(objectId).parent().attr("id");
19            var currentHref = window.location.href.split("#")[0];
20            var tab = $('a[data-toggle="tab"][href="' + currentHref + '#' + tabId + '"]');
21            return tab;
22        }
23
24        /**
25         * Retourne l'élément de l'onglet depuis le hash
26         */
27        function getTabPerIdHash() {
28            var urlObjectId = window.location.hash;
29
30            // On supprime le préfixe "show" de l'url, pour retrouver l'id
31            // de l'élément à ouvrir
32            var objectId = '#' + urlObjectId.split('show')[1];
33
34            var currentHref = window.location.href.split("#")[0];
35
36            var tab = $('a[data-toggle="tab"][href="' + currentHref + objectId + '"]');
37
38            return tab;
39        }
40
41        function openTab() {
42            // Activation d'un onglet par hash
43            var $hashTab;
44            var tabIsOpened = false;
45
46            $hashTab = getTabPerTypo3Hash();
47            if ($hashTab.length == 0) {
48                $hashTab = getTabPerIdHash();
49            }
50            if ($hashTab.length > 0) {
51                $hashTab.tab('show');
52
53                // Scroll de la page vers cet élément
54                //scrollManager.scrollTo($hashTab);
55                $(document).TCScroll({action: 'scrollTo', element: $hashTab});
56                tabIsOpened = true;
57            }
58            return tabIsOpened;
59        }
60
61
62        openTab();
63
64        $('a[data-toggle="tab"][data-bookmark]').click(function () {
65            var nativeHash = $(this).attr("href").split("#")[1];
66            window.location.hash = 'show' + nativeHash;
67        });
68    };
69
70    $.fn.TCTabs.defaults = {};
71
72}(jQuery));

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.