MouseOverThis!

By Blair Last update Jul 17, 2005 — Installed 2,227 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 5 posts, 4 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
Rod McGuire Scriptwright

First off I believe .onmouseover can be attached to any DOM node, not just links. I've done things like document.body.addEventListener('click', myfun).

Second, I came across a site that used

document.onmouseover = hidestatus;

This is not stored as an attribute of document. To fix this you have to do:

unsafeWindow.document.onmouseover = null;

 
nitro322 Scriptwright

Blair, this is a fantastic script. I've been wanting to do something like this myself for quite some time, but I'm just horrible with javascript. Thanks a bunch for the script.

I do have one suggestion, though. Some sites (most notably Google, if you forget to log out of one of their services) use the onMouseDown/onMouseClick event to rewrite the link when you click it. So, even though the status bar shows the "correct" destination when hovering over the link, that destination is changed when the link is actually clicked. Devious.

Would it be possible update this script to catch those events as well? I think a logical way to do it would be to rewrite any links modified by onMouseDown/onMouseClick immediately after page load rather than waiting until the link is actually clicked. That way, you'd be shown the true destination.

 
Blair Script's Author

Jesse, thats a good idea, I will see what I can do to implement it.

 
Jesse Andrews Admin

This is a great little userscript. It currently works by iterating through all the links removing the onmouseover/out. Perhaps we could modify it to act as follows:

If shift is down, then hide don't execute the onmouseover/onmouseout, if not, execute them as written.

This might be able to be accomplished by wrapping the code inside "if (shift_held) { code; }"