Grooveshark Resizeable Queue

Brings back the good old button for manual queue resizing

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name        Grooveshark Resizeable Queue
// @namespace   torvin
// @include     http://grooveshark.com/*
// @version     1.1
// @require     https://code.jquery.com/jquery-2.1.1.min.js
// @description Brings back the good old button for manual queue resizing
// ==/UserScript==
	
const queueIcon = 'data:image/png;base64,' +
'iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACx' +
'jwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAABp0RVh0' +
'U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAAAfklEQVQ4T7WT0QnAMAhE2/2XygDZyfZC' +
'0g99koC0cBREX85objO7Sp8AUu/dq70xS9RW3ShOALKGEvQIAK6Wy38A1LNidD/oIPQ7L/AcAKdp' +
'CmWA2vDiFhIHuA80RtkNJ81YWKgMQJuH0yEAJmbbGAC7xFXg/99byBJ28TLgAWfJnAPegGRzAAAA' +
'AElFTkSuQmCC';

var interval = setInterval(function() {
	if (!$('#queue-menu-btn').length)
		return;
	clearInterval(interval);
	
	$('#queue-menu-btn').after(
		$('<a>').attr('id', 'queue-size').addClass('btn btn-large btn-l-gray btn-icon-only').css({
			'width': '32px',
			'height': '32px',
			'padding': 0,
		}).append(
			$('<i>').css({
				'background-image': 'url("' + queueIcon + '")',
				'left': '8px',
				'top': '8px',
				'margin': 0,
			}).addClass('icon')
		).click(function() {
			var size = $('#main.queue-small').length ? 'm' : 's';
			unsafeWindow.GS.trigger("queue:setSize", size, true, true)
		})
	);
}, 500);