mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Added async attribute to signup form script tag
This commit is contained in:
parent
ba6ae472c3
commit
c27b488f3d
3 changed files with 9 additions and 1 deletions
|
@ -112,7 +112,7 @@ export default class SignupFormEmbedModal extends Component {
|
||||||
dataOptionsString += ` data-${key}="${escapeHtml(value)}"`;
|
dataOptionsString += ` data-${key}="${escapeHtml(value)}"`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const code = `<div style="${escapeHtml(style)}"><script src="${encodeURI(scriptUrl)}"${dataOptionsString}></script></div>`;
|
const code = `<div style="${escapeHtml(style)}"><script src="${encodeURI(scriptUrl)}"${dataOptionsString} async></script></div>`;
|
||||||
|
|
||||||
if (preview && this.style === 'minimal') {
|
if (preview && this.style === 'minimal') {
|
||||||
// Add background
|
// Add background
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
data-site="%VITE_SITE_URL%"
|
data-site="%VITE_SITE_URL%"
|
||||||
data-label-1="Signup form"
|
data-label-1="Signup form"
|
||||||
data-label-2="With logo"
|
data-label-2="With logo"
|
||||||
|
async
|
||||||
></script>
|
></script>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -47,6 +48,7 @@
|
||||||
data-site="%VITE_SITE_URL%"
|
data-site="%VITE_SITE_URL%"
|
||||||
data-label-1="Signup form"
|
data-label-1="Signup form"
|
||||||
data-label-2="Without logo"
|
data-label-2="Without logo"
|
||||||
|
async
|
||||||
></script>
|
></script>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -61,6 +63,7 @@
|
||||||
data-site="%VITE_SITE_URL%"
|
data-site="%VITE_SITE_URL%"
|
||||||
data-label-1="Signup form"
|
data-label-1="Signup form"
|
||||||
data-label-2="Minimal"
|
data-label-2="Minimal"
|
||||||
|
async
|
||||||
></script>
|
></script>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -74,6 +77,7 @@
|
||||||
src="/src/index.tsx?other2"
|
src="/src/index.tsx?other2"
|
||||||
data-button-color="#ff0095"
|
data-button-color="#ff0095"
|
||||||
data-site="https://invalid/"
|
data-site="https://invalid/"
|
||||||
|
async
|
||||||
></script>
|
></script>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
data-site="%VITE_SITE_URL%"
|
data-site="%VITE_SITE_URL%"
|
||||||
data-label-1="Signup form"
|
data-label-1="Signup form"
|
||||||
data-label-2="With logo"
|
data-label-2="With logo"
|
||||||
|
async
|
||||||
></script>
|
></script>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -44,6 +45,7 @@
|
||||||
data-site="%VITE_SITE_URL%"
|
data-site="%VITE_SITE_URL%"
|
||||||
data-label-1="Signup form"
|
data-label-1="Signup form"
|
||||||
data-label-2="Without logo"
|
data-label-2="Without logo"
|
||||||
|
async
|
||||||
></script>
|
></script>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -57,6 +59,7 @@
|
||||||
data-site="%VITE_SITE_URL%"
|
data-site="%VITE_SITE_URL%"
|
||||||
data-label-1="Signup form"
|
data-label-1="Signup form"
|
||||||
data-label-2="Minimal"
|
data-label-2="Minimal"
|
||||||
|
async
|
||||||
></script>
|
></script>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -69,6 +72,7 @@
|
||||||
src="http://localhost:6174/signup-form.min.js"
|
src="http://localhost:6174/signup-form.min.js"
|
||||||
data-button-color="#ff0095"
|
data-button-color="#ff0095"
|
||||||
data-site="https://invalid/"
|
data-site="https://invalid/"
|
||||||
|
async
|
||||||
></script>
|
></script>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue