summaryrefslogtreecommitdiffstats
path: root/public/js
diff options
context:
space:
mode:
Diffstat (limited to 'public/js')
-rw-r--r--public/js/gogs.js13
1 files changed, 13 insertions, 0 deletions
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)
+ )
+ });
}