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.

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

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

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

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

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

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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.

(I already have a user style manager, let me install it!)

// ==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");
		});
	});