From 829b2c414ce186794f8818962493072b920835a4 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Mon, 15 May 2017 21:26:43 +0200 Subject: Add progress dots for Hashcash. --- static-files/js/comment-submission.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'static-files') 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('Calculating Hashcash...'); + submit_button.after('Calculating Hashcash. Please wait...'); 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--; -- cgit v1.2.3