diff options
author | Sean McGivern <sean@gitlab.com> | 2017-04-17 18:40:34 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2017-04-17 18:40:34 +0300 |
commit | e072806ac2e170e7638df1def47f6380b4e5b63b (patch) | |
tree | 792c1ac8fd04686ce8cf3a0f835fe27139333850 /app/assets/javascripts/usage_ping.js | |
parent | 8d10add4a504079c00bea3284cb8a7ab71cc8aaf (diff) |
Make ESLint happy
Diffstat (limited to 'app/assets/javascripts/usage_ping.js')
-rw-r--r-- | app/assets/javascripts/usage_ping.js | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/app/assets/javascripts/usage_ping.js b/app/assets/javascripts/usage_ping.js index 4c8ca345778..fd3af7d7ab6 100644 --- a/app/assets/javascripts/usage_ping.js +++ b/app/assets/javascripts/usage_ping.js @@ -1,16 +1,15 @@ -(global => { - global.gl = global.gl || {}; +function UsagePing() { + const usageDataUrl = $('.usage-data').data('endpoint'); - gl.UsagePing = function() { - var usage_data_url = $('.usage-data').data('endpoint'); + $.ajax({ + type: 'GET', + url: usageDataUrl, + dataType: 'html', + success(html) { + $('.usage-data').html(html); + }, + }); +} - $.ajax({ - type: "GET", - url: usage_data_url, - dataType: "html", - success: function (html) { - $(".usage-data").html(html); - } - }); - }; -})(window); +window.gl = window.gl || {}; +window.gl.UsagePing = UsagePing; |