From 34acb707ac782f6918789f6c62f1d21f14a9de42 Mon Sep 17 00:00:00 2001 From: John Shaver Date: Thu, 26 Jul 2018 12:55:31 -0700 Subject: [PATCH] Tied in new homepage with the rest of the app. --- app/index.html | 2 +- app/js/app.js | 17 ++++++++++++++++- index.html | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/app/index.html b/app/index.html index 3ba101c..73790ae 100644 --- a/app/index.html +++ b/app/index.html @@ -7,7 +7,7 @@
- +

Get the green lock for your website

diff --git a/app/js/app.js b/app/js/app.js index 3bcf59b..15e5bfb 100644 --- a/app/js/app.js +++ b/app/js/app.js @@ -11,6 +11,7 @@ var apiUrl = 'https://acme-{{env}}.api.letsencrypt.org/directory'; function updateApiType() { + console.log("type updated"); var input = this || Array.prototype.filter.call( $qsa('.js-acme-api-type'), function ($el) { return $el.checked; } )[0]; @@ -507,8 +508,22 @@ hideForms(); $qs('.js-acme-form-download').hidden = false; } - steps[1](); + var params = new URLSearchParams(window.location.search); + var apiType = params.get('acme-api-type') || "staging-v02"; + + if(params.has('acme-domains')) { + console.log("acme-domains param: ", params.get('acme-domains')); + $qs('.js-acme-domains').value = params.get('acme-domains'); + + $qsa('.js-acme-api-type').forEach(function(ele) { + if(ele.value === apiType) { + ele.checked = true; + } + }); + submitForm(); + } + $qs('body').hidden = false; }()); diff --git a/index.html b/index.html index f3e154a..987c3c4 100644 --- a/index.html +++ b/index.html @@ -59,7 +59,7 @@ - +
View Source (git)