JSFiddle - React, Tailwind, and code Playground
by jcubed111
HTML
<base href="/cats/">
<a href="/#7">
go!
</a>
<a href="http://google.com/#7">
google!
</a>
<script>
base=document.getElementsByTagName("base");
base=base[0].href;
links=document.getElementsByTagName('a');
for(index in links){
if(links[index].href.indexOf(base+"#")==0){
links[index].href=document.location+links[index].href.slice(links[index].href.indexOf("#"));
}
}
</script>