Steam Scroll

Adds mouse wheel support to the horizontal screenshot slider on Steam product pages.

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 or Violentmonkey 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        Steam Scroll
// @description Adds mouse wheel support to the horizontal screenshot slider on Steam product pages.
// @namespace   Steam
// @include     http://store.steampowered.com/app/*
// @version     1
// @grant       none
// ==/UserScript==

window.setTimeout(function() {
	function hscroll(event) {
		event.preventDefault();
		
		var down = Math.max(-1, Math.min(1, (event.wheelDelta || -event.detail))) <= 0;
		var item = jQuery('.highlight_strip_screenshot.focus')[down ? 'next' : 'prev']('.highlight_strip_screenshot')[0];
		if (!item) {
			var items = jQuery('.highlight_strip_screenshot');
			item = items[down ? 0 : items.length-1];
		}
		g_player.HighlightItem(item);
		g_player.ClearInterval();
	}

	var scroller = jQuery('#highlight_strip')[0];
	if (scroller.addEventListener) {
		scroller.addEventListener('mousewheel', hscroll, false);
		scroller.addEventListener('DOMMouseScroll', hscroll, false);
	}
	scroller.attachEvent('onmousewheel', hscroll);
	
	g_player.ClearInterval();
},100);