| Total Complexity | 5 |
| Complexity/F | 1.25 |
| Lines of Code | 32 |
| Function Count | 4 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | $(document).ready(function(){ |
||
| 2 | |||
| 3 | $.ajaxSetup({ |
||
| 4 | headers: { |
||
| 5 | 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') |
||
| 6 | }, |
||
| 7 | }); |
||
| 8 | |||
| 9 | axios.defaults.headers.common['X-CSRF-TOKEN'] = $('meta[name="csrf-token"]').attr('content'); |
||
|
|
|||
| 10 | |||
| 11 | const el = document.querySelector('img'); |
||
| 12 | const observer = lozad(el); // passing a `NodeList` (e.g. `document.querySelectorAll()`) is also valid |
||
| 13 | observer.observe(); |
||
| 14 | |||
| 15 | |||
| 16 | $(function () { |
||
| 17 | $('[data-toggle="popover"]').popover(); |
||
| 18 | $('[maileclipse-data-toggle="tooltip"]').tooltip(); |
||
| 19 | }) |
||
| 20 | |||
| 21 | $(document).on('click', function (e) { |
||
| 22 | $('[data-toggle="popover"],[data-original-title]').each(function () { |
||
| 23 | //the 'is' for buttons that trigger popups |
||
| 24 | //the 'has' for icons within a button that triggers a popup |
||
| 25 | if (!$(this).is(e.target) && $(this).has(e.target).length === 0 && $('.popover').has(e.target).length === 0) { |
||
| 26 | (($(this).popover('hide').data('bs.popover')||{}).inState||{}).click = false // fix for BS 3.3.6 |
||
| 27 | } |
||
| 28 | |||
| 29 | }); |
||
| 30 | }); |
||
| 31 | |||
| 32 | }); |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.