Closed odonline closed 1 year ago
Hi @odonline! Thanks for creating this issue. The templates repo has moved to workers-sdk monorepo. I'll close this issue, but feel free to open a pull request to update the regex script in the worker-sdk repo. I can also investigate and add it for you.
on examples/third-party-scripts/third-party-scripts.js there is a combination regex patterns to get script tags
and on the function modifyHtmlStream
there is a problem with the combination of RegExp patterns because that can´t get the whole script tag on an html fetched file
<script src="https://www.googletagservices.com/tag/js/gpt.js"></script>
so i made a new one so you can test it and look if it´s a better one
example regexp on this link https://regex101.com/r/csy1QX/2
the patter offcourse could be better but the one with the scripting example didn´t worked for me.