From e5997bf7042bb914d8a6fc115ab4757756754434 Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Tue, 30 Apr 2019 16:22:14 +0200 Subject: [PATCH] :hourglass: ajoute un lien static pour la PR de migration afin de tester plus extensivement les scripts --- netlify.toml | 7 ++++++- .../sites/mon-entreprise.fr/iframe-integration-script.js | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/netlify.toml b/netlify.toml index b71958890..ef94b071c 100644 --- a/netlify.toml +++ b/netlify.toml @@ -148,6 +148,11 @@ status = 200 FR_SITE = "https://mon-entreprise.fr${path}" MASTER = 'true' -[context."demo"] +[context."demo".environment] EN_SITE = "https://demo.mon-entreprise.fr${path}?s=m" FR_SITE = "https://demo.mon-entreprise.fr${path}" + +# TEMP Just for testing the iframe when migrating from embauche to mon-entreprise +[context."migration-embauche".environment] + EN_SITE = "https://deploy-preview-520--syso.netlify.com${path}?s=m" + FR_SITE = "https://deploy-preview-520--syso.netlify.com${path}" \ No newline at end of file diff --git a/source/sites/mon-entreprise.fr/iframe-integration-script.js b/source/sites/mon-entreprise.fr/iframe-integration-script.js index 75e477665..c47d69511 100644 --- a/source/sites/mon-entreprise.fr/iframe-integration-script.js +++ b/source/sites/mon-entreprise.fr/iframe-integration-script.js @@ -10,8 +10,8 @@ let script = document.getElementById('script-simulateur-embauche'), ), integratorUrl = encodeURIComponent(window.location.href.toString()), src = - baseUrl + - `?s=e&couleur=${couleur}&iframe&integratorUrl=${integratorUrl}&lang=${lang}` + baseUrl + (baseUrl.indexOf('?') !== -1 ? '&' : '?') + + `couleur=${couleur}&iframe&integratorUrl=${integratorUrl}&lang=${lang}` const iframe = document.createElement('iframe') const iframeAttributes = {