PageSourceSearch

https://knappenverein.de/wp-content/themes/ecologist/assets/js/like.js?ver=1.0

js knappenverein.de collected 2026-10-09 17:00:25 UTC 2,004 bytes, 86 lines download raw bytes

1(function($) {
2    'use strict';
3
4    var like = {};
5    mkd.modules.like = like;
6
7    like.mkdLikes = mkdLikes;
8
9    like.mkdOnDocumentReady = mkdOnDocumentReady;
10    like.mkdOnWindowLoad = mkdOnWindowLoad;
11    like.mkdOnWindowResize = mkdOnWindowResize;
12    like.mkdOnWindowScroll = mkdOnWindowScroll;
13
14    $(document).ready(mkdOnDocumentReady);
15    $(window).on('load', mkdOnWindowLoad);
16    $(window).resize(mkdOnWindowResize);
17    $(window).scroll(mkdOnWindowScroll);
18    
19    /* 
20        All functions to be called on $(document).ready() should be in this function
21    */
22    function mkdOnDocumentReady() {
23        mkdLikes();
24    }
25
26    /* 
27        All functions to be called on $(window).load() should be in this function
28    */
29    function mkdOnWindowLoad() {
30
31    }
32
33    /* 
34        All functions to be called on $(window).resize() should be in this function
35    */
36    function mkdOnWindowResize() {
37
38    }
39
40    /* 
41        All functions to be called on $(window).scroll() should be in this function
42    */
43    function mkdOnWindowScroll() {
44
45    }
46    
47
48    function mkdLikes() {
49
50        $(document).on('click','.mkd-like', function() {
51
52            var likeLink = $(this),
53                id = likeLink.attr('id'),
54                type;
55
56            if ( likeLink.hasClass('liked') ) {
57                return false;
58            }
59
60            if(typeof likeLink.data('type') !== 'undefined') {
61                type = likeLink.data('type');
62            }
63
64            var dataToPass = {
65                action: 'ecologist_mikado_like',
66                likes_id: id,
67                type: type
68            };
69
70            var like = $.post(mkdLike.ajaxurl, dataToPass, function( data ) {
71
72                likeLink.html(data).addClass('liked').attr('title','You already like this!');
73
74                if(type !== 'portfolio_list') {
75                    likeLink.children('span').css('opacity',1);
76                }
77
78            });
79
80            return false;
81        });
82
83    }
84
85
86})(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.