diff options
| author | 2014-07-09 20:20:17 +0200 | |
|---|---|---|
| committer | 2014-07-09 20:20:17 +0200 | |
| commit | ab9d656135e5afcafb824e73a49ff2e9fd2a2dbd (patch) | |
| tree | 61018c0175436d3e15bf23531d9eb11f4e37017d /p/scripts | |
| parent | c1728fe0d776ccdedc20efd3120da599ac4157ed (diff) | |
Block user to click many times on the refresh button
See https://github.com/marienfressinaud/FreshRSS/issues/513
Diffstat (limited to 'p/scripts')
| -rw-r--r-- | p/scripts/main.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js index 54ee7f0fd..243159ca5 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -1,7 +1,8 @@ "use strict"; var $stream = null, isCollapsed = true, - shares = 0; + shares = 0, + ajax_loading = false; function is_normal_mode() { return $stream.hasClass('normal'); @@ -684,14 +685,22 @@ function init_actualize() { var auto = false; $("#actualize").click(function () { + if (ajax_loading) { + return false; + } + + ajax_loading = true; + $.getScript('./?c=javascript&a=actualize').done(function () { if (auto && feed_count < 1) { auto = false; - return; + ajax_loading = false; + return false; } updateFeeds(); }); + return false; }); |
