This is an automated email from the ASF dual-hosted git repository.

garren pushed a commit to branch add-slack-join-link
in repository https://gitbox.apache.org/repos/asf/couchdb-www.git

commit ec0862cf62a30adf7878c0b55e5e536aea778846
Author: Garren Smith <garren.sm...@gmail.com>
AuthorDate: Mon Jun 22 13:15:04 2020 +0200

    remove slack.js and use slack join link
---
 index.html      | 14 ++++++--------
 script/slack.js | 53 -----------------------------------------------------
 2 files changed, 6 insertions(+), 61 deletions(-)

diff --git a/index.html b/index.html
index 3b95ecd..c423c15 100644
--- a/index.html
+++ b/index.html
@@ -419,7 +419,7 @@ Thanks to Yohei Shimomae and the Apache Cordova team for 
the original design.
 
       <p>
         We run community chat channels on <a 
href="http://freenode.org";>Freenode IRC network</a> and <a 
href="https://slack.com";>Slack.</a>
-        IRC is open and very common, but Slack is more user-friendly. We have 
a Slack/IRC bridge so you can use what you prefer and your messages will be 
relayed.
+        IRC is open and very common, but Slack is more user-friendly.
       </p>
     </div>
     <div class="grid contribute">
@@ -432,12 +432,11 @@ Thanks to Yohei Shimomae and the Apache Cordova team for 
the original design.
               <span class="core card-icon"></span>
               <span class="skill-card-heading-text">Slack</span>
             </h3>
-            <p class="slack-slogan">To start using Slack, enter your email 
address here for an invite:</p>
-            <form id="slack-form" class="chat-slack-integration">
-              <input class="chat-email-input" type="email" 
placeholder="m...@mydomain.com" required>
-              <button type="submit" class="chat-submit-slack">Get your 
invite</button>
-              <div class="chat-slack-form-message"></div>
-            </form>
+            <p class="slack-slogan">To start using Slack, click on the join 
link below:</p>
+            <ul>
+              <li>&mdash; <a class="" 
href="https://join.slack.com/t/couchdb/shared_invite/zt-fa9zim0j-H04m4o_KcLdWeOxEAcwM8g";
 target="_blank" rel="noopener noreferrer">Join CouchDB Slack</a></li>
+            </ul>
+
            </div>
         </div>
 
@@ -752,7 +751,6 @@ Thanks to Yohei Shimomae and the Apache Cordova team for 
the original design.
     var s = document.getElementsByTagName('script')[0]; 
s.parentNode.insertBefore(ga, s);
     })();
   </script>
-  <script type="text/javascript" src="script/slack.js"></script>
   <script>
     $(document).ready(function () {
       $('.download-list').on('click', function (e) {
diff --git a/script/slack.js b/script/slack.js
deleted file mode 100644
index 56d8861..0000000
--- a/script/slack.js
+++ /dev/null
@@ -1,53 +0,0 @@
-$(document).ready(function () {
-    $('#slack-form').submit(function (e) {
-        e.preventDefault();
-        var btn = $('.chat-submit-slack', this),
-            email = $('.chat-email-input', this),
-            formMessage = $('.chat-slack-form-message', this);
-
-        console.log(email.val());
-        if (!email.val()) {
-            return;
-        }
-
-        btn.prop('disabled', true);
-        $.ajax({
-            type: 'POST',
-            url: 'https://couchdb-slack.now.sh/invite',
-            dataType: 'json',
-            crossDomain: true,
-            contentType: 'application/json; charset=utf-8',
-            data: JSON.stringify({ email: email.val() })
-        })
-        .fail(function (res) {
-            console.log('res', res);
-            var err;
-            try {
-              err = JSON.parse(res.responseText);
-            } catch (e) {
-              console.log('err', e);
-            }
-
-            if (!err) {
-              return 
formMessage.removeClass('slack-message').addClass('slack-message-fail')
-                  .html('Sorry, there was a server error. Please try our <a 
href="https://couchdb-slack.now.sh";>Backup invite form</a>');
-            }
-            if (/already been invited/.test(err.msg)) {
-                return 
formMessage.removeClass('slack-message').addClass('slack-message-fail')
-                    .text('It looks like you\'ve already joined!');
-            }
-
-            
formMessage.removeClass('slack-message').addClass('slack-message-fail')
-                .text(err.msg);
-        })
-        .done(function (data) {
-            email.val('');
-            formMessage.removeClass('slack-message')
-                .addClass('slack-message-done')
-                .text('Woot! Check your email!');
-        })
-        .always(function () {
-            btn.prop('disabled', false);
-        });
-    });
-});

Reply via email to