Currently I have the following structure (the ID at the end changes based on the code given by the shortner)
example.com/7NGOWX
example.com/7iTAXM
With javascript I am current using this code to change the url but it leaves the id.
<script>
document.body.innerHTML = document.body.innerHTML.replace(/example.com/g, '');
</script>
How can I make it so that it removes the entire url instead of leaving things like 7NGOWX 7iTAXM behind?