TF2R - Show hidden comments

Lets you see the hidden comments on raffles

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name	TF2R - Show hidden comments
// @namespace	auhtwoo
// @description	Lets you see the hidden comments on raffles
// @include http://tf2r.com/k*
// @grant	none
// @version 0.0.2
// ==/UserScript==  


$(window).load(function(){
var rafflid = document.URL.slice(document.URL.indexOf(".com/k")+6,document.URL.length-5);
function getposts (){
	$("#morpb").text("Loading...");
	$.ajax({
			type: "post",
			url: "http://tf2r.com/job.php",
			dataType: "json",
			data: {
				"checkraffle": "true",
				"rid": rafflid,
				"lastentrys": entryc,
				"lastchat": 0
			},
			success: function(data){
				if(data.status == "fail")
					alert(data.message);
				else if(data.status == "ok")										
					if(data.message.chaten.length >= 1)
						var datamessages = data.message.chaten.slice(0,-50).reverse();
						for(id in datamessages){
							var ent = datamessages[id];
							$(".userfeed").append("<div class=\"userfeedpost\" style=\"display:none; background-color:#"+ent.color+";\"><div class=\"ufinf\"><div class=\"ufname\"><a href=\""+ent.url+"\" style=\"color:#"+ent.color+";\">"+ent.name+"</a></div><div class=\"ufavatar\"><a href=\""+ent.url+"\"><img src=\""+ent.avatar+"\"></a></div></div><div class=\"ufmes\">"+ent.message+"</div></div>");
						}
				$("#morpb").text("Done, please wait");
				$("#morpd").slideUp("1000",function(){$("#morpd").remove()});
			}
	});
}
if ($(".userfeedpost").length == 50){
	$(".userfeed").append('<div id="morpd" class="userfeedpost"><div class="ufinf"></div><div class="ufmes"><button id="morpb">Limit reached, click to load hidden comments</button><br></div></div>');
	document.getElementById("morpb").addEventListener("click", getposts);
}
});