From 5e51935601e3bc994c9261f498dda1a0870676b2 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 4 May 2018 20:26:06 +0000 Subject: [PATCH] PRODUCTION! --- index.html | 48 +++++++++++++++++++++++++++++++++++++----------- js/app.js | 14 ++++++++++++-- 2 files changed, 49 insertions(+), 13 deletions(-) diff --git a/index.html b/index.html index 71c2af9..492ffbc 100644 --- a/index.html +++ b/index.html @@ -3,37 +3,63 @@ Greenlock™ +
+
+

Greenlock™ - Instant, Free SSL Certificates via Let's Encrypt v2

+
+
+
+
- +

+
+ +
+
+
+ + +
+
- +

+
+
+
advanced (use existing account) +
-
- +

How will you validate your domain?

+
+
+
- Verify Domains & Sub-Domains: +
+ +

Verify Domains & Sub-Domains

@@ -71,7 +97,7 @@
- Verify Wildcard Domains: +

Verify Wildcard Domains

@@ -96,8 +122,9 @@ - Verifying Domains... + Verifying Domains... (give us 5 seconds or so...) +
-

+

-

+

@@ -164,8 +192,6 @@ var server = https.createServer({ --> - - diff --git a/js/app.js b/js/app.js index c1308d9..2fefb13 100644 --- a/js/app.js +++ b/js/app.js @@ -9,8 +9,18 @@ var kid; var i = 1; - //$qs('.js-acme-directory-url').value = 'https://acme-v02.api.letsencrypt.org/directory'; - $qs('.js-acme-directory-url').value = 'https://acme-staging-v02.api.letsencrypt.org/directory'; + var apiUrl = 'https://acme-{{env}}.api.letsencrypt.org/directory'; + function updateApiType() { + var input = this || Array.prototype.filter.call( + $qsa('.js-acme-api-type'), function ($el) { return $el.checked; } + )[0]; + console.log('ACME api type radio:', input.value); + $qs('.js-acme-directory-url').value = apiUrl.replace(/{{env}}/g, input.value); + } + $qsa('.js-acme-api-type').forEach(function ($el) { + $el.addEventListener('change', updateApiType); + }); + updateApiType(); function hideForms() { $qsa('.js-acme-form').forEach(function (el) {