PageSourceSearch

https://jakub.jankiewicz.org/js/script.js?nocache=b32b08ca

js jankiewicz.org collected 2026-10-03 21:25:42 UTC 2,174 bytes, 62 lines download raw bytes

1$.fn.tooltip = function(options) {
2    var settings = $.extend({}, {
3        arrowSize: 5
4    }, options);
5    return this.each(function() {
6        var self = $(this).attr('title', '');
7        var wrapper = self.wrap('<div></div>').parent().addClass('tooltip-wrapper');
8        var tooltip = $('<div></div>');
9        var width = tooltip.html(self.data('tooltip').replace(/ /g, '&nbsp;')).innerWidth();
10        tooltip.css({
11            top: -self.height()-2,
12            left: -(width-self.width())/2
13        }).addClass('tooltip');
14        tooltip.appendTo(wrapper);
15        self.mouseenter(function() {
16            if (!self.data('hover')) {
17                self.data('hover', true);
18                var width = tooltip.innerWidth();
19                tooltip.css({
20                    left: -(width-self.width())/2
21                });
22            }
23        });
24    });
25};
26
27$(function() {
28    var $email = $('a[data-type=email]');
29    var email = $email.text().replace('[at]', '@').replace('[dot]', '.').replace(/\s+/g, '');
30    $email.attr('href', 'mailto:' + email).text(email);
31    $('.profiles a').tooltip();
32    var pages = $('.pages ul a').click(function() {
33        $(this).addClass('selected').parent().siblings().find('a').removeClass('selected');
34    });
35    // pagination [commented out]
36    $('.pages span a').click(function() {
37        if ($(this).hasClass('disabled')) {
38            return false;
39        }
40        var selected = $('.pages ul a.selected')
41        var succ = selected.parent()[$(this).attr('class')]();
42        if (succ.length) {
43            selected.removeClass('selected');
44            succ.find('a').addClass('selected');
45        }
46    });
47    $('.pages a').click(function() {
48        var index = $('.pages ul a.selected').parent().index();
49        if (index === 0) {
50            $('.pages .prev').addClass('disabled');
51        } else {
52            $('.pages .prev').removeClass('disabled');
53        }
54        console.log(index + ' ' + pages.length);
55        if (index === pages.length-1) {
56            $('.pages .next').addClass('disabled');
57        } else {
58            $('.pages .next').removeClass('disabled');
59        }
60    });
61
62});

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.