Please help me replace the specific part domain by general code

Solution for Please help me replace the specific part domain by general code
is Given Below:

I want to replace “https://hanoiopentour.vn” by a general code to use for any domain. And here is my code:

<div expr:id='"summary" + data:post.id'>
<data:post.body />
</div>
<script type="text/javascript">
        highlightSearchTerms('keyword-1', true, 'https://hanoiopentour.vn/tour-mu-cang-chai-2-ngay-1-dem-2021', 'summary<data:post.id/>');
        highlightSearchTerms('keyword-2', true, 'Link-2', 'summary<data:post.id/>');
        highlightSearchTerms('keyword-1', true, 'Link-3', 'summary<data:post.id/>');
</script>

The result I expect will be like this:

<div expr:id='"summary" + data:post.id'>
<data:post.body />
</div>
<script type="text/javascript">
        highlightSearchTerms('keyword-1', true, '[something_here]/tour-mu-cang-chai-2-ngay-1-dem-2021', 'summary<data:post.id/>');
        highlightSearchTerms('keyword-2', true, '[something_here]/article_title', 'summary<data:post.id/>');
        highlightSearchTerms('keyword-1', true, '[something_here]/article_title', 'summary<data:post.id/>');
</script>

Thanks!

If you want to get the origin use window.location.origin

<div expr:id='"summary" + data:post.id'>
<data:post.body />
</div>
<script type="text/javascript">
        highlightSearchTerms('keyword-1', true, (window.location.origin+'/tour-mu-cang-chai-2-ngay-1-dem-2021'), 'summary<data:post.id/>');
        highlightSearchTerms('keyword-2', true, (window.location.origin+''/article_title'), 'summary<data:post.id/>');
        highlightSearchTerms('keyword-1', true, (window.location.origin+''/article_title'), 'summary<data:post.id/>');
</script>