PageSourceSearch

https://www.bestcanvas.se/components/blog/js/blog-esential.js

js bestcanvas.se collected 2026-09-26 09:13:46 UTC 1,965 bytes, 54 lines download raw bytes

1$(document).ready(function() {
2
3    // Add pinterest button to every article
4    $('.story .image.socialImage').each(function() {
5        var $img = $(this),
6            img = $img.attr('src'),
7            url = $img.parent().attr('href'),
8            $url = $img.parent(),
9            desc = $url.next('.body').children('p').text();
10            $img.after('<a href="https://pinterest.com/pin/create/button/?url=' + encodeURIComponent(document.location + url) + '&amp;media=' + img + '&amp;description=' + encodeURIComponent(desc) + '" class="pin-it-btn">Save</a>');
11    });
12
13    // Show pinterest button on hover
14    $('body').on('mouseenter', '.story-box > a', function() {
15        $(this).find('.pin-it-btn').fadeIn();
16    }).on('mouseleave', '.story-box > a', function() {
17        $(this).find('.pin-it-btn').fadeOut();
18    });
19
20    // Open popup on buttons click
21     $(document).on('click', '.pin-it-btn', function(e) {
22        e.preventDefault();
23        window.open(this.href, 'Pinterest', 'width=760,height=640');
24    });
25
26    // Initialize pagination
27    $('#easyPaginate').easyPaginate({
28         paginateElement: 'article',
29         hashPage: 'page',
30         urlParam: '/blog.jsf',
31         elementsPerPage: 10,
32         effect: 'slide',
33         slideOffset: 50,
34         firstButton: false,
35         lastButton: false
36    });
37
38    // Tag filter functionality
39    $('#category-filter .filter-action').on('click', function() {
40        // Remove active class from all buttons
41        $('#category-filter .filter-action').removeClass('active');
42        // Add active class to clicked button
43        $(this).addClass('active');
44        
45        // Get the filter tag from the clicked button
46        var filterTag = $(this).attr('data-filter-name');
47        
48        // Call the pagination's filter method
49        var filterByTag = $('#easyPaginate').data('filterByTag');
50        if (filterByTag) {
51            filterByTag(filterTag);
52        }
53    });
54});

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.