Total Complexity | 8 |
Complexity/F | 1.33 |
Lines of Code | 41 |
Function Count | 6 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | /* |
||
11 | (function ($) { |
||
12 | |||
13 | $(document).ready(function () { |
||
14 | |||
15 | |||
16 | $(document).on("click", ".laravel-h5p-restricted", function (e) { |
||
|
|||
17 | |||
18 | var $this = $(this); |
||
19 | |||
20 | $.ajax({ |
||
21 | url: "{{ route('laravel-h5p.library.restrict') }}", |
||
22 | data: {id: $this.data('id'), selected: $this.is(':checked')}, |
||
23 | success: function (response) { |
||
24 | alert('Changed'); |
||
25 | } |
||
26 | }); |
||
27 | |||
28 | }); |
||
29 | |||
30 | $(document).on("click", ".laravel-h5p-destory", function (e) { |
||
31 | |||
32 | var $this = $(this); |
||
33 | if (confirm("Are you sure you want to delete this library?")) { |
||
34 | $.ajax({ |
||
35 | url: "{{ route('laravel-h5p.library.destory') }}", |
||
36 | data: {id: $this.data('id')}, |
||
37 | success: function (response) { |
||
38 | // alert('Deleted'); |
||
39 | if (response.msg) { |
||
40 | alert(response.msg); |
||
41 | } |
||
42 | } |
||
43 | }); |
||
44 | |||
45 | } |
||
46 | |||
47 | }); |
||
48 | |||
49 | }); |
||
50 | |||
51 | })(H5P.jQuery); |
||
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.