diff options
Diffstat (limited to 'app/assets/javascripts/peek.js')
-rw-r--r-- | app/assets/javascripts/peek.js | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/app/assets/javascripts/peek.js b/app/assets/javascripts/peek.js index 06a07c19e09..60f8bdd14c0 100644 --- a/app/assets/javascripts/peek.js +++ b/app/assets/javascripts/peek.js @@ -1,19 +1,16 @@ import 'vendor/peek'; import 'vendor/peek.performance_bar'; -(function() { - $(document).on('click', '#peek-show-queries', function(e) { - var $modal; - $('.peek-rblineprof-modal').hide(); - $modal = $('#modal-peek-pg-queries'); - if ($modal.length) { - $modal.modal('toggle'); - } - return e.preventDefault(); - }); +$(document).on('click', '#peek-show-queries', function(e) { + e.preventDefault(); + $('.peek-rblineprof-modal').hide(); + let $modal = $('#modal-peek-pg-queries'); + if ($modal.length) { + $modal.modal('toggle'); + } +}); - $(document).on('click', '.js-lineprof-file', function(e) { - $(this).parents('.heading').next('div').toggle(); - return e.preventDefault(); - }); -}).call(window); +$(document).on('click', '.js-lineprof-file', function(e) { + e.preventDefault(); + $(this).parents('.heading').next('div').toggle(); +}); |