Grooveshark Resizeable Queue

Brings back the good old button for manual queue resizing

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