BTN - collapse tech specs

hide+click to expand

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

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

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.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu betiği yüklemek için bir betik yöneticisi eklentisi yüklemeniz gerekecektir.

(Zaten bir betik yöneticim var, hadi yükleyelim!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name        BTN - collapse tech specs
// @description hide+click to expand
// @namespace   diff
// @include     http*://broadcasthe.net/torrents.php?*id=*
// @grant	none
// @version     0.1.2
// ==/UserScript==

var torrents = document.querySelectorAll("[id^='torrent_']");
for (i=0; detail=torrents[i]; i++) {
	blocks = detail.getElementsByTagName("blockquote");
	specs = blocks[1];
	specs.style.display="none";

	var showhide = document.createElement('blockquote');
	showhide.innerHTML = "click to show specs";
	showhide.style.cursor = 'pointer';
	showhide.setAttribute("onClick", "javascript: this.nextSibling.style.display=''; this.style.display='none';");
	specs.parentNode.insertBefore(showhide, specs);
}