0

When you hover over a link, a 'destination' pops up at the bottom of your browser. How do I remove this?

I've spent hours googling it and can't find what the damn 'destination popup' thingy is called.

Ryan B
  • 3,364
  • 21
  • 35
  • The place where it is displayed is usually called as a Status bar. Check [here](http://stackoverflow.com/a/19814290/2513523) for an answer. – AyB Jan 27 '14 at 05:47
  • I don't recommend doing this. As somebody who uses the keyboard to navigate, i use the status bar on sites that removes the `:focus` or has bad contrast. – Ryan B Jan 27 '14 at 05:51
  • I see you are new to Stack Overflow. If you appreciate any answers, don't forget to choose the best one and mark it as "accepted" using the checkmark to the left of the answer, just below the voting arrows. If a better answer comes along later, you can change the accepted answer to that one. Accepting an answer will also award you some reputation points! If you haven't taken the SO tour, check it out here: http://stackoverflow.com/tour – m59 Jan 27 '14 at 06:05
  • @user007, awesome! thanks for the name of it! – user3229248 Jan 27 '14 at 16:50

2 Answers2

1

I don't believe that can actually be disabled, but you can hack around it if you must. You can remove the "href" property from the link and instead attach a click event listener to the element which changes the page. You could keep the href stored on the element itself by renaming it to something like data-href, to be proper. However, I wouldn't recommend doing this at all. Nonetheless, here you go:

Live demo (click).

<a data-href="some/place">No Status on this Link!</a>

JavaScript:

var anchors = document.querySelectorAll('a[data-href]');

for (var i=0; i<anchors.length; ++i) {
  var anchor = anchors[i];
  var href = anchor.getAttribute('data-href');
  anchor.addEventListener('click', function() {
    window.location = href;
  });
}
m59
  • 43,214
  • 14
  • 119
  • 136
  • Thanks for trying, but it didn't work on Google Chrome. Most reasonable answer though. – user3229248 Jan 27 '14 at 16:46
  • @user3229248 are you sure? See my demo. The first link doesn't show a location. The second link does. It is impossible for the a link to show that bar if it doesn't have an href property. I promise it works, I'm using Chrome. – m59 Jan 27 '14 at 17:18
  • At first glance, when I read 'No Status on this Link!', I thought it was referring to no status on the link below. I didn't release that IT was an actual link itself. It worked. Thank you! – user3229248 Jan 27 '14 at 17:25
0

I don't think it is possible. But still if you want to achieve this don't make href attribute to go to the destination url, instead use onclick event like :

<a href="#" onclick="location.href ='http://www.example.com';">Some Text</a>
user2936213
  • 1,021
  • 1
  • 8
  • 19
  • Answer stolen and made worse. *slow clap* Inline js is bad practice and should never be used. – m59 Jan 27 '14 at 05:54
  • Its not stolen I have personally used this and its working for me. – user2936213 Jan 27 '14 at 05:55
  • I'm not going to debate. The OP can see the posted time. I'm just going to once again state that this code is following poor practice using `onclick` and shouldn't be considered for use. – m59 Jan 27 '14 at 05:57
  • Even I also dont want to debate. It was working for me so i posted. If its bad practice to use onclick then thanks for informing that ill check in my futher projects not to use onclick again. – user2936213 Jan 27 '14 at 06:00
  • I can appreciate that. Read some of these results: https://www.google.com/search?q=Why+is+inline+js+bad%3F – m59 Jan 27 '14 at 06:02