Previews Script

adjust the amount of previews shown

2020-09-18 يوللانغان نەشرى. ئەڭ يېڭى نەشرىنى كۆرۈش.

You will need to install an extension such as Tampermonkey, Greasemonkey 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 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.

You will need to install a user script manager extension to install this script.

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

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         Previews Script
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  adjust the amount of previews shown
// @author       Oki
// @match        https://*.jstris.jezevec10.com/*
// @grant        none
// ==/UserScript==

/**************************
    Previews Script        
**************************/

(function() {
    window.addEventListener('load', function(){

var previewOption = document.createElement("tr");
previewOption.innerHTML = '<td>Previews:</td><td style="width:100px"><input id="previewControl" oninput="refreshPreviews()" type="range" min="0" max="5" value="5" step="1" style="width:100px;display:inline-block;padding-top:9px">&nbsp;&nbsp;<span id="previewSetting">5</span></td>'
tab_settings.children[1].appendChild(previewOption);

window.refreshPreviews = function() {
	previewSetting.innerHTML=previewControl.value;
	queueCanvas.style.clipPath=`inset(0px 0px ${360-72*previewControl.value}px 0px)`
	split = document.getElementsByClassName("queueCopy");
	for (x of split) {
		x.style.visibility = x.id[9] < previewControl.value ? "visible" : "hidden"
	}
}




    });
})();