From d42f97b028c4d73b5d502ceb0363670400591a53 Mon Sep 17 00:00:00 2001 From: Lena Orobei Date: Thu, 16 Apr 2020 16:38:11 -0500 Subject: [PATCH 1/4] Fix test generation --- .../Test/Mftf/Test/SecurityTxtWithCorrectConfiguration.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Securitytxt/Test/Mftf/Test/SecurityTxtWithCorrectConfiguration.xml b/Securitytxt/Test/Mftf/Test/SecurityTxtWithCorrectConfiguration.xml index 91df0d85..f25ed1ab 100644 --- a/Securitytxt/Test/Mftf/Test/SecurityTxtWithCorrectConfiguration.xml +++ b/Securitytxt/Test/Mftf/Test/SecurityTxtWithCorrectConfiguration.xml @@ -21,7 +21,7 @@ - + From f498a7adb7d020008fa5c921bc3a5200e3b2104e Mon Sep 17 00:00:00 2001 From: Lena Orobei Date: Thu, 16 Apr 2020 16:54:04 -0500 Subject: [PATCH 2/4] Fix JS code style --- .../frontend/web/js/reCaptchaScriptLoader.js | 38 +++++++++---------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/ReCaptchaFrontendUi/view/frontend/web/js/reCaptchaScriptLoader.js b/ReCaptchaFrontendUi/view/frontend/web/js/reCaptchaScriptLoader.js index 5f17a32f..94746c33 100644 --- a/ReCaptchaFrontendUi/view/frontend/web/js/reCaptchaScriptLoader.js +++ b/ReCaptchaFrontendUi/view/frontend/web/js/reCaptchaScriptLoader.js @@ -4,30 +4,28 @@ */ define([], function () { - 'use strict'; + 'use strict'; - var scriptTagAdded = false; + var scriptTagAdded = false; - return { - /** - * Add script tag. Script tag should be added once - */ - addReCaptchaScriptTag: function () { - var element, - scriptTag; + return { + /** + * Add script tag. Script tag should be added once + */ + addReCaptchaScriptTag: function () { + var element, scriptTag; - if (!scriptTagAdded) { - element = document.createElement('script'); - scriptTag = document.getElementsByTagName('script')[0]; + if (!scriptTagAdded) { + element = document.createElement('script'); + scriptTag = document.getElementsByTagName('script')[0]; - element.async = true; - element.src = 'https://www.google.com/recaptcha/api.js' + - '?onload=globalOnRecaptchaOnLoadCallback&render=explicit'; + element.async = true; + element.src = 'https://www.google.com/recaptcha/api.js' + + '?onload=globalOnRecaptchaOnLoadCallback&render=explicit'; - scriptTag.parentNode.insertBefore(element, scriptTag); - scriptTagAdded = true; - } + scriptTag.parentNode.insertBefore(element, scriptTag); + scriptTagAdded = true; } } - } -); + }; +}); From f61ccdf516b43b87ba579157c45d221702f830de Mon Sep 17 00:00:00 2001 From: Lena Orobei Date: Thu, 16 Apr 2020 18:36:33 -0500 Subject: [PATCH 3/4] Fix JS code style --- ReCaptchaFrontendUi/view/frontend/web/js/reCaptcha.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReCaptchaFrontendUi/view/frontend/web/js/reCaptcha.js b/ReCaptchaFrontendUi/view/frontend/web/js/reCaptcha.js index 0321bf70..e74bd69b 100644 --- a/ReCaptchaFrontendUi/view/frontend/web/js/reCaptcha.js +++ b/ReCaptchaFrontendUi/view/frontend/web/js/reCaptcha.js @@ -105,7 +105,7 @@ define( $parentForm = $wrapper.parents('form'); me = this; - let parameters = _.extend( + var parameters = _.extend( { 'callback': function (token) { // jscs:ignore jsDoc me.reCaptchaCallback(token); From 5e89d8dab1f7a148f4de0d0aa57399c2e113fcfb Mon Sep 17 00:00:00 2001 From: Lena Orobei Date: Thu, 16 Apr 2020 19:29:42 -0500 Subject: [PATCH 4/4] Fix JS code style --- ReCaptchaFrontendUi/view/frontend/web/js/reCaptcha.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ReCaptchaFrontendUi/view/frontend/web/js/reCaptcha.js b/ReCaptchaFrontendUi/view/frontend/web/js/reCaptcha.js index e74bd69b..63688881 100644 --- a/ReCaptchaFrontendUi/view/frontend/web/js/reCaptcha.js +++ b/ReCaptchaFrontendUi/view/frontend/web/js/reCaptcha.js @@ -34,8 +34,6 @@ define( * @private */ _loadApi: function () { - var element, scriptTag; - if (this._isApiRegistered !== undefined) { if (this._isApiRegistered === true) { $(window).trigger('recaptchaapiready'); @@ -81,7 +79,8 @@ define( $parentForm, $wrapper, $reCaptcha, - widgetId; + widgetId, + parameters; if (this.captchaInitialized) { return; @@ -105,7 +104,7 @@ define( $parentForm = $wrapper.parents('form'); me = this; - var parameters = _.extend( + parameters = _.extend( { 'callback': function (token) { // jscs:ignore jsDoc me.reCaptchaCallback(token);