Howrse onMouseDown Menus

Turns the 5 onmouseover menus into onmousedown menus

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name        Howrse onMouseDown Menus
// @namespace   myHowrse
// @description Turns the 5 onmouseover menus into onmousedown menus
// @include     http://www.howrse.com/*
// @author      daexion
// @version     1
// ==/UserScript==
var links = document.getElementsByTagName('a');

for(var i=0;i<links.length;++i)
{
	if(links[i].hasAttribute("onmouseover"))
		if(links[i].getAttribute("onmouseover") == "menuOn('elevage')")
		{
			links[i].setAttribute("onmousedown",links[i].getAttribute("onmouseover"));
			links[i].removeAttribute("onmouseover");
		}
	if(links[i].hasAttribute("onmouseover"))
		if(links[i].getAttribute("onmouseover") == "menuOn('centre')")
		{
			links[i].setAttribute("onmousedown",links[i].getAttribute("onmouseover"));
			links[i].removeAttribute("onmouseover");
		}
	if(links[i].hasAttribute("onmouseover"))
		if(links[i].getAttribute("onmouseover") == "menuOn('communaute')")
		{
			links[i].setAttribute("onmousedown",links[i].getAttribute("onmouseover"));
			links[i].removeAttribute("onmouseover");
		}
	if(links[i].hasAttribute("onmouseover"))
		if(links[i].getAttribute("onmouseover") == "menuOn('classement')")
		{
			links[i].setAttribute("onmousedown",links[i].getAttribute("onmouseover"));
			links[i].removeAttribute("onmouseover");
		}
	if(links[i].hasAttribute("onmouseover"))
		if(links[i].getAttribute("onmouseover") == "menuOn('profil')")
		{
			links[i].setAttribute("onmousedown",links[i].getAttribute("onmouseover"));
			links[i].removeAttribute("onmouseover");
		}
}