fetch window URL and verify using data-sly-test
The below lines of scripts loads for both author and publish instances. But I want to restrict it based on author and publish environment. Our author environment URL has "author-" keyword in it, while publish environment URL doesn't. So I was thinking can the URL help in this case? I wanted to fetch the URL and verify before loading the script. Can the URL be verified using a data-sly-test? And how can i fetch the URL?
<sly data-sly-test= <need to verify here>>
<script type="text/javascript" src="//<path here>"></script>
<script type="text/javascript" src="//<path here>"></script>
</sly>


