Skip to content

Instantly share code, notes, and snippets.

@ryancatalani
Created February 1, 2022 03:16
Show Gist options
  • Save ryancatalani/52b845b709ff6b5280d98e9aa045f8ba to your computer and use it in GitHub Desktop.
Save ryancatalani/52b845b709ff6b5280d98e9aa045f8ba to your computer and use it in GitHub Desktop.
Take a Zoom registration link and replace it with an embed.
function replaceZoomRegistration(html) {
const regex = />(http.+zoom.us\/meeting\/register.+?)</gi;
if (!!html.match(regex)) {
return html.replaceAll(regex, `><iframe src="$1" frameborder="0" style="width: 100%; height: 100vh">Loading…</iframe>
<p style="font-size: 0.8em; font-style: italic;">Can’t see the registration form? <a href="$1" target="_blank">Click here to open it in a new window.</a></p><`);
}
return html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment