I want to hide, remove or manipulate URL display in left-bottom in browser like Google.
Trying with JS:
<a href="https://example.com" onmouseover="window.status='google.com'; return true;" onmouseout="window.status=''; return true;">Example</a>
Trying with CSS :
.no-tooltip:hover::after {
content: none !important;
}
<a href="http://example.com" class="no-tooltip">Link</a>
Google example :
In Google, when you place pointer in any search result or ahref tag it show URL Status like above screenshot but when you click it or copy it you will find different https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=&cad=rja&uact=8&ved=2ahUKEwizyLqk54X-AhWIUGwGHeqDA5EQFnoECCUQAQ&url=https%3A%2F%2Fexample.com%2F&usg=AOvVaw2g9Si57HiLP2X7LeNGKaHd
Screenshot :
2
Answers
You can use
event.preventDefault
to block link propagation and then redirect to another page with javascript.Here’s a simple example:
Hope i was helpful!
You cannot change
Window.status
. To achive desire result, you can uselocation.href
orlocation.replace
To include left-clicks, right-clicks and contextmenu
For multiple URL using class & for-loop
Only Right click to all
a href
with respective URL