PageSourceSearch

https://www.geektime.co.il/wp-content/plugins/wpdiscuz-report-flagging/assets/js/flag.js?ver=7.1.0

js geektime.co.il collected 2026-10-02 03:30:39 UTC 2,916 bytes, 85 lines download raw bytes

1jQuery(document).ready(function ($) {
2    $(document).on('click', '.comment_flag', function () {
3        var clicked = $(this);
4        var commentId = clicked.attr('id').substring(3);
5        if (clicked.hasClass('comment_flag_modal')) {
6            $(".fc-popup").slideToggle(300, function () {
7                $('#wpdiscuz_fc_commentid').val(commentId);
8            });
9        } else {
10            fcReport(commentId);
11        }
12    });
13
14    function fcReport(commentId) {
15        var data = new FormData();
16        data.append('action', 'fcReport');
17        data.append('commentId', commentId);
18        wpdiscuzAjaxObj.getAjaxObj(true, true, data).done(function (response) {
19            try {
20                var r = JSON.parse(response);
21                var clicked = $('#fc_' + commentId);
22                if (r.code) {
23                    clicked.css('color', wpdiscuzAjaxObj.primaryColor);
24                    clicked.addClass('fc_flagged');
25                } else {
26                    wpdiscuzAjaxObj.setCommentMessage(r.message, 'error');
27                }
28            } catch (e) {
29                console.log(e);
30            }
31            $('#wpdiscuz-loading-bar').fadeOut(250);
32        });
33    }
34
35
36    $(document).on('click', '.fc-send', function () {
37        var data = new FormData();
38        data.append('action', 'fcReportEmail');
39        data.append('form', $('#wpdiscuz_fc_form').serialize());
40        wpdiscuzAjaxObj.getAjaxObj(true, true, data).done(function (response) {
41            try {
42                var r = JSON.parse(response);
43                var clicked = $('#fc_' + r.commentId);
44                if (r.code) {
45                    clicked.css('color', wpdiscuzAjaxObj.primaryColor);
46                    clicked.addClass('fc_flagged');
47                    fcResetWindow(2);
48                } else {
49                    $(".fc_msg").removeClass("fc_success_msg");
50                    $(".fc_msg").addClass("fc_error_msg").html(r.message);
51                }
52
53            } catch (e) {
54                console.log(e);
55            }
56            $('#wpdiscuz-loading-bar').fadeOut(250);
57        });
58    });
59
60    $(document).on('click', '.fc-close, .fc-email', function () {
61        fcResetWindow();
62    });
63
64    function fcResetWindow(a) {
65        if (a != 1) {
66            $(".fc-popup").slideToggle(300);
67        }
68        $(".fc_msg").html('');
69        $('#wpdiscuz_fc_form')[0].reset();
70    }
71
72    if ($('input[name="wpdiscuz_report"]:checked').val() == 'other') {
73        $('.fc-message-area').show();
74    } else {
75        $('.fc-message-area').hide();
76    }
77
78    $(document).on('change', 'input[name="wpdiscuz_report"]', function () {
79        if ($(this).val() === 'other') {
80            $('.fc-message-area').show();
81        } else {
82            $('.fc-message-area').hide();
83        }
84    });
85});

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.