Muted users

Check if you have still muted somebody.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name           Muted users
// @namespace      arreloco
// @description    Check if you have still muted somebody.
// @include        http://www.kongregate.com/games/*
// @version 0.0.1.20160306133130
// ==/UserScript==
function init()
{
	var dom;

	try{
		if(unsafeWindow){
			dom = unsafeWindow;
		} else {
			dom = this;
		}
	}catch(e){
		dom = this;
	}

	var holodeck = dom.holodeck;
	
		//Credit goes partially to Ventero for this command
		holodeck.addChatCommand("get_muted", function(l,n){
			var matchArr1 = n.match(/^\/\S+\s+(\d+)/),
					roomDetails = l.chatWindow(),
					countArr = [];
			var muted_people = roomDetails._mutings;
			var mutedArr = new Array();

			for(var i in muted_people){
				mutedArr.push("<a target='_blank' href='http://www.kongregate.com/accounts/"+[i]+"'>"+[i]+"</a>");
			}

			var txt = mutedArr.toString();
			for(var i in muted_people){
				txt = txt.replace(","," - ");
			}
			
			l.activeDialogue().displayUnsanitizedMessage("Muted Users", (txt?txt:"You have no one muted."), {"class":"whisper received_whisper"}, {non_user: true});
			
			return false;
			
		})
		
		holodeck._chat_commands.muted = holodeck._chat_commands.get_muted;
}//end init()

setTimeout(init,0);