Howrse onMouseDown Menus

Turns the 5 onmouseover menus into onmousedown menus

  1. // ==UserScript==
  2. // @name Howrse onMouseDown Menus
  3. // @namespace myHowrse
  4. // @description Turns the 5 onmouseover menus into onmousedown menus
  5. // @include http://www.howrse.com/*
  6. // @author daexion
  7. // @version 1
  8. // ==/UserScript==
  9. var links = document.getElementsByTagName('a');
  10.  
  11. for(var i=0;i<links.length;++i)
  12. {
  13. if(links[i].hasAttribute("onmouseover"))
  14. if(links[i].getAttribute("onmouseover") == "menuOn('elevage')")
  15. {
  16. links[i].setAttribute("onmousedown",links[i].getAttribute("onmouseover"));
  17. links[i].removeAttribute("onmouseover");
  18. }
  19. if(links[i].hasAttribute("onmouseover"))
  20. if(links[i].getAttribute("onmouseover") == "menuOn('centre')")
  21. {
  22. links[i].setAttribute("onmousedown",links[i].getAttribute("onmouseover"));
  23. links[i].removeAttribute("onmouseover");
  24. }
  25. if(links[i].hasAttribute("onmouseover"))
  26. if(links[i].getAttribute("onmouseover") == "menuOn('communaute')")
  27. {
  28. links[i].setAttribute("onmousedown",links[i].getAttribute("onmouseover"));
  29. links[i].removeAttribute("onmouseover");
  30. }
  31. if(links[i].hasAttribute("onmouseover"))
  32. if(links[i].getAttribute("onmouseover") == "menuOn('classement')")
  33. {
  34. links[i].setAttribute("onmousedown",links[i].getAttribute("onmouseover"));
  35. links[i].removeAttribute("onmouseover");
  36. }
  37. if(links[i].hasAttribute("onmouseover"))
  38. if(links[i].getAttribute("onmouseover") == "menuOn('profil')")
  39. {
  40. links[i].setAttribute("onmousedown",links[i].getAttribute("onmouseover"));
  41. links[i].removeAttribute("onmouseover");
  42. }
  43. }