Total Complexity | 5 |
Complexity/F | 1.25 |
Lines of Code | 33 |
Function Count | 4 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | $.ajax({ |
||
2 | url: "list", |
||
3 | method: "POST", |
||
4 | success: function (res, stats) { |
||
5 | console.log(res); |
||
|
|||
6 | }, |
||
7 | }); |
||
8 | |||
9 | AjaxForm(); |
||
10 | |||
11 | $(".comment-container").click(function () { |
||
12 | var email = $('#comment_submission [name="email"]'); |
||
13 | var avatar = `https://www.gravatar.com/avatar/${md5( |
||
14 | email.val().toString().trim() |
||
15 | )}`; |
||
16 | |||
17 | var gravatar_submission = $("#comment_submission img.avatar"); |
||
18 | if (gravatar_submission.length) { |
||
19 | gravatar_submission.attr("src", avatar); |
||
20 | } |
||
21 | |||
22 | $(this).addClass("toggled"); |
||
23 | |||
24 | $(document).click(function () { |
||
25 | $(".comment-container").removeClass("toggled"); |
||
26 | }); |
||
27 | |||
28 | $(".comment-container").click(function (e) { |
||
29 | e.stopPropagation(); |
||
30 | }); |
||
31 | |||
32 | $(this).find("textarea").focus(); |
||
33 | }); |
||
34 |