From 404867f206f97ec4ea2e6032fea47bc0499d3497 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Sat, 5 Dec 2015 13:24:13 -0500 Subject: fix #2105 and fix #1857 --- public/js/gogs.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'public/js') diff --git a/public/js/gogs.js b/public/js/gogs.js index a045f56069..be17b8c8f2 100644 --- a/public/js/gogs.js +++ b/public/js/gogs.js @@ -548,6 +548,19 @@ function initWebhook() { $('.events.fields').hide(); } }); + + // Test delivery + $('#test-delivery').click(function () { + var $this = $(this); + $this.addClass('loading disabled'); + $.post($this.data('link'), { + "_csrf": csrf + }).done( + setTimeout(function () { + window.location.href = $this.data('redirect'); + }, 5000) + ) + }); } -- cgit v1.2.3