JSFiddle - React, Tailwind, and code Playground
HTML
<a href="http://google.com/"></a>
JavaScript
$('a').each(function(){
$(this).text(this.protocol + "//" + (this.hostname || this.pathname));
});
<a href="http://google.com/"></a>
$('a').each(function(){
$(this).text(this.protocol + "//" + (this.hostname || this.pathname));
});