Steam Scroll

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

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

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 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        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);