PageSourceSearch

https://www.lebenshilfe-trier.de/fileadmin/src/js/extensions.js?1537191078

js lebenshilfe-trier.de collected 2026-10-07 03:08:13 UTC 2,462 bytes, 82 lines download raw bytes

1/**
2 * Stefan Hill // 4.12.17
3 */
4
5function get_repr_mode() {
6    var a = document.cookie;
7    var name = a.substr(0, a.search('='));
8    var val = a.substr(a.search('=') + 1, a.search(';'));
9    if (val == '') {
10        val = a.substr(a.search('=') + 1, a.length);
11    }
12    return val;
13}
14
15function set_repr_mode(m) {
16    var d = new Date();
17    d = new Date(d.getTime() + 1000000000)
18    document.cookie = 'repr_mode=' + m + '; expires=' + d.toGMTString() + ';';
19    $('body').addClass('repr_' + m);
20}
21
22function event_handler() {
23    $('.result_repr').on('click', function () {
24        if ($('body').hasClass('repr_gal')) {
25            set_repr_mode('list');
26            $('body').removeClass('repr_gal');
27        } else {
28            set_repr_mode('gal');
29            $('body').removeClass('repr_list');
30        }
31    });
32    $('#kesearch_filters .list').on('click', function () {
33       $(this).find('ul').toggleClass('open');
34    });
35}
36
37function make_result_table() {
38    var list = $('.result_list_table');
39    $('.result-list-item').each(function () {
40        var url = $(this).find('a').attr('href');
41        var t = '<td>' + $(this).find('h3').html() + '</td>';
42        var a = t + $(this).find('table tr').html();
43        list.append('<tr>' + a + '</tr>');
44    });
45}
46
47function make_filters() {
48    if ('body.page-uid-3') {
49        $('#kesearch_filters .list .selected').each(function () {
50            var url = $(this).next('.kesGreyButt').attr('href');
51            var c = '<a href="' + url + '" class="selection">' + $(this).find("a").html() + '</a>';
52            $(this).closest('.list').append(c);
53            $(this).closest('ul').hide();
54            $(this).closest('.list').addClass('hide_after');
55        });
56    }
57}
58
59
60$(document).ready(function () {
61    if ('body.page-uid-3') {
62        if (document.cookie) {
63            var mode = get_repr_mode();
64            switch (mode) {
65                case 'list':
66                    $('body').addClass('repr_list');
67                    break;
68                case 'gal':
69                    $('body').addClass('repr_gal');
70                    break;
71                default:
72                    $('body').addClass('repr_gal');
73                    break;
74            }
75        } else {
76            set_repr_mode('gal');
77        }
78        make_filters();
79        make_result_table();
80        event_handler();
81    }
82});

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.