PageSourceSearch

https://www.larec-skazok.ru/bundles/user/js/appfavorite.js?1.3.3

js larec-skazok.ru collected 2026-10-02 10:27:08 UTC 1,421 bytes, 47 lines download raw bytes

1
2var appasyncadd = appasyncadd || [];
3(function(){
4    var app = {}, am = {}, self = {};
5    var loader = function(an_app){
6        app = an_app;
7        am = app.misc;
8        ap = app.misc.popup;
9        app.favorite = module;
10        self = module;
11        self.init();
12    };
13    setTimeout(function(){ appasyncadd.push(loader); }, 0);
14
15    var busy = false, popup = $(), form = $();
16
17    var module = {
18        init: function() {
19            $('body').on('click', '.js_favorite', function(e) {
20                e.preventDefault();
21
22                if (busy) return;
23                busy = true;
24
25                // var objId = 
26
27                am.promiseCmd({
28                    method: 'user.add_favorite',
29                    obj_type: $(this).data('obj_type'),
30                    obj_id: $(this).data('obj_id')
31                }).always(function(){
32                    busy = false;
33
34                }).done(function(res){
35                    var el = $('.js_favorite[data-obj_type="'+res.objType+'"][data-obj_id="'+res.objId+'"]');
36                    $('.js_result_favorite[data-obj_type="'+res.objType+'"][data-obj_id="'+res.objId+'"]').text(res.count);
37
38                    if (res.isFavorite) {
39                        el.addClass('selected');
40                    } else {
41                        el.removeClass('selected');
42                    }
43                });
44            });
45        }
46    };
47})();

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.