reddit.com - Expand Dropdowns by Hover

Hover on 'sorted by:' and 'links from:' dropdowns to expand them, move the mouse away for close. Avoid one unnecessary click.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name               reddit.com - Expand Dropdowns by Hover
// @namespace          a-pav
// @description        Hover on 'sorted by:' and 'links from:' dropdowns to expand them, move the mouse away for close. Avoid one unnecessary click.
// @match              *://*.reddit.com/*
// @match              *://reddit.com/*
// @version            1.0
// @run-at             document-end
// @author             a-pav
// @grant              none
// @icon               https://www.redditstatic.com/desktop2x/img/favicon/apple-icon-76x76.png
// ==/UserScript==

// operates on old design.
document.querySelectorAll("div.menuarea>div.spacer>div.dropdown.lightdrop")
	.forEach(function(elm) { 
		elm.addEventListener('mouseenter', function(event) {
			// 'open_menu' function is from reddit.com
			open_menu(event.target);
		});

		elm.nextSibling.addEventListener('mouseleave', function(event) {
			this.classList.remove("inuse");
		});
	});