PageSourceSearch

https://rubensousa.com/assets/js/scripts.js

js rubensousa.com collected 2026-10-03 23:19:12 UTC 2,284 bytes, 63 lines download raw bytes

1svg4everybody();
2
3jQuery(document).ready( function() {
4
5    // Makes all videos responsive.
6    jQuery(".the-content").fitVids();
7
8    // Shows the number of search results.
9    jQuery('#search-input').on('focus', function() {
10        jQuery('.show-results-count').addClass('active');
11    });
12
13    // Shows available sharing options.
14    jQuery('.share').on('click', function() {
15        jQuery(this).addClass('active');
16    });
17
18    // Hides available sharing options and the number of search results.
19    jQuery(document).on('click focus', function(e) {
20        if (jQuery(e.target).closest('.share').length === 0 && jQuery(e.target).closest('#search-input').length === 0) {
21            jQuery('.show-results-count').removeClass('active');
22            jQuery('.results-container').hide();
23            jQuery('.share').removeClass('active');
24        }
25    });
26
27    // Generates a quick link to the current heading section.
28    jQuery('.post-content').find(':header').on({
29        mouseenter: function() {
30            var headingID = jQuery(this).attr('id');
31            jQuery(this).append('<a class="heading-marker" href="#' + headingID + '">&#35;</a>');
32        },
33        mouseleave: function () {
34            jQuery(this).children('a').remove();
35        }
36    });
37
38    // Automatically sets the first post image as a featured image on Facebook and Twitter.
39    var firstImg = jQuery('.post.single').find('img:first-of-type');
40    var firstImgSrc = firstImg.attr('src');
41    if (typeof firstImgSrc !== 'undefined') {
42        jQuery('meta[property="og:image"]').attr('content', firstImgSrc);
43        jQuery('meta[name="twitter:image"]').attr('content', firstImgSrc);
44    }
45
46    // Menus Show/Hide
47    var steveSidebar = jQuery('.user-profile');
48    var viewportWidth = window.innerWidth;
49
50    jQuery(window).on('resize', function() {
51        viewportWidth = window.innerWidth;
52        if (viewportWidth > 768 && steveSidebar.hasClass('active')) {
53            steveSidebar.removeClass('active');
54            jQuery('.wrapper').removeClass('active');
55            jQuery('#toggleBurger').prop('checked', false);
56        }
57    });
58
59    jQuery('.trigger').on('click', function() {
60        steveSidebar.toggleClass('active');
61        jQuery('.wrapper').toggleClass('active');
62    });
63});

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.