FlyerTalk Forums - View Single Post - New greasemonkey userscript for airport code lookup
Old Mar 2, 2007 | 9:03 am
  #4  
mwarden
10 Countries Visited
20 Countries Visited
30 Countries Visited
15 Years on Site
 
Join Date: Aug 2006
Location: AUS
Programs: DL Gold
Posts: 290
Interesting idea, but I would suggest you find an implementation method that does not create and destroy a timer every time the mousemove event is fired! Mousemove may fire for every single pixel that the mouse moves, depending on how fast the pointer is moving. That means that a move of 400px at the required speed would create and destroy 399 timers! All this just to time the hover delay before the tooltip appears?

Also, all of this is unnecessary in ACLHide():

ACLtooltip.innerHTML = ACLdefinitions;
ACLtooltip.style.left = 0 + "px";
ACLtooltip.style.top = 0 + "px";
ACLtooltip.style.width = 0 + "px";
ACLtooltip.style.height = 0 + "px";

... which matters because ACLHide is also called with every mouse move.

Just some thoughts. If you change the implementation to reflect these suggestions, please post here again, because I would like to try out the extension (it'd be nice on these forums!).
mwarden is offline