Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/VincentTam/huginn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Tam <sere@live.hk>2019-07-26 21:13:31 +0300
committerVincent Tam <sere@live.hk>2019-07-26 21:15:31 +0300
commit7f91aaf7add8a8c2528b513a9ef9315cd2ae9db3 (patch)
tree0986e16ed16be5815788d4a46b0321f7c340465e /assets/js/staticman.js
parent500a780b0dfc733a307bf7cd0da8d9c026ddd86f (diff)
Dynamically set form action URL
https://www.willmaster.com/library/manage-forms/bot-block-for-forms.php
Diffstat (limited to 'assets/js/staticman.js')
-rw-r--r--assets/js/staticman.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/assets/js/staticman.js b/assets/js/staticman.js
index dd21c81..052f076 100644
--- a/assets/js/staticman.js
+++ b/assets/js/staticman.js
@@ -10,9 +10,14 @@ $(document).ready(function() {
$('input[type="submit"]:enabled').addClass('hidden'); // hide "submit"
$('input[type="submit"]:disabled').removeClass('hidden'); // show "submitted"
+ var endpoint = '{{ .endpoint | default "https://staticman-frama.herokuapp.com" }}';
+ var gitProvider = '{{ .gitprovider }}';
+ var repo = '{{ .repo }}';
+ var branch = '{{ .branch }}';
+
$.ajax({
type: $(this).attr('method'),
- url: $(this).attr('action'),
+ url: endpoint + '/v3/entry/' + gitProvider + '/' + repo + '/' + branch + '/comments',
data: $(this).serialize(),
contentType: 'application/x-www-form-urlencoded',
success: function (data) {