steam card exchange simple viewer

just click the 'Sets Available' view showcase on the right side

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         steam card exchange simple viewer
// @namespace    https://github.com/deathxlent/steamcardexchangeviewer
// @version      0.11
// @description  just click the 'Sets Available' view showcase on the right side
// @author       deathxlent
// @match        http://www.steamcardexchange.net/index.php?inventory
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

	$('#notification').prepend('<style>div.showcase-element {width: 120px; height:240px ;  position: relative;       float: left;    background-color: #18191B;    background-color: rgba(0, 0, 0, .3);}</style>');
	var noneedReg=new RegExp('<div class="showcase-element"></div>','g');
    $('#inventorylist > tbody > tr > td:nth-child(4)').each(function(){
	    var ele=$(this);
		ele.unbind();
		ele.css("border","1px #338FCC solid");
		ele.css("cursor","pointer");
		ele.bind("click",function(){
			var id=ele.attr("id").replace('set-','');
			$("div").remove("#div_d");
			$.ajax({
				url:'http://www.steamcardexchange.net/index.php?gamepage-appid-'+id,
				type:'GET',
				async:true,
				dataType:'text',
				success:function(data){
					$('#notification').prepend("<div id='div_d' style='position:absolute;right:0;top:"+ele.position().top+"px;height:80%;width:400px;'></div>");
					var obj=jQuery.parseHTML(data);
					var htmlStr='';
					$(obj).find('.showcase-element-container').each(function(){
						htmlStr+=$(this).attr('class').replace('showcase-element-container ','')+"<br/>"+$(this).html().replace(noneedReg,'');
					});
					$('#div_d').html(htmlStr);
				}
			});
		});
	});

})();