Created
February 1, 2022 03:16
-
-
Save ryancatalani/52b845b709ff6b5280d98e9aa045f8ba to your computer and use it in GitHub Desktop.
Take a Zoom registration link and replace it with an embed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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