Streaming live at 10am (PST)

How to inject script src from a URL param?

Is it possible to inject script-src of a custom HTML code elemet using a URL param? if so, how?

Hey, yeah, you could probably do something like:

const params = new URLSearchParams(;
const yourParam = params.get('yourParam'); // Getting your specific parameter
document.write(`<script src="${yourParam}"></script>`);

I haven’t tested it, but try it out :slight_smile:

1 Like