summaryrefslogtreecommitdiff
path: root/static-files/js
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2017-05-15 21:26:43 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2017-05-15 21:26:43 +0200
commit829b2c414ce186794f8818962493072b920835a4 (patch)
tree67bb88b78f8a23ed5d485c1548559115bf9d79d9 /static-files/js
parentcaa72ac4e39b473ff155235c2c2aba2197908f35 (diff)
Add progress dots for Hashcash.
Diffstat (limited to 'static-files/js')
-rw-r--r--static-files/js/comment-submission.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/static-files/js/comment-submission.js b/static-files/js/comment-submission.js
index 2704b0f..731b0b8 100644
--- a/static-files/js/comment-submission.js
+++ b/static-files/js/comment-submission.js
@@ -22,13 +22,14 @@ jQuery(function($) {
var text = form.find('textarea').val().replace(/\s+/g, "");
var submit_button = form.find(':submit');
var status_message;
- submit_button.after('<span class="hashcash-status-message">Calculating Hashcash...</span>');
+ submit_button.after('<span class="hashcash-status-message">Calculating Hashcash. Please wait...<span id="hashcash-status-dots"></span></span>');
status_message = form.find('.hashcash-status-message');
status_message.fadeOut(0);
status_message.fadeIn(200);
submit_button.attr("disabled", true);
var tryHashcash = function () {
var tryRightNow = 1000;
+ $('#hashcash-status-dots').append('.');
while (!acceptable_cashhash(Sha256.hash(text + ":" + tkey + ":" + salt))) {
salt++;
tryRightNow--;