Forum Voices

Brings back the "voices" in threads

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name           Forum Voices
// @namespace      ventero.de
// @author         Ventero
// @description    Brings back the "voices" in threads
// @include        http://www.kongregate.com/forums/*
// @date           05.04.2013
// @version        0.7
// @license        MIT license
// ==/UserScript==
// Written by Ventero (http://www.kongregate.com/accounts/Ventero) 07.11.2010
// Licensed under MIT/X11 license
// Copyright (c) 2010-2013 Ventero
// http://www.opensource.org/licenses/mit-license.php

function createVoices(){
	var forum_info = $$(".forum_info")[0];
	forum_info.setStyle({overflow: "visible"});

	var sidebar = new Element("div", {
		style: "position: absolute; width: 300px; right: 0px; top: -30px;"
	}).insert(new Element("h5").update("Voices"));
	var container = sidebar.wrap(new Element("div", {
		style: "position: relative;"
	}));

	var ul = new Element("ul", {"class": "flat talking"});
	$$(".fn").map(function(ele){
		return $A(ele.down("a").getAttribute("href").split("/")).last();
	}).uniq().each(function(user){
		ul.insert(new Element("li", {"style": "display: inline-block;"}).insert(
			new Element("a", {href: "/accounts/" + user}).update(user)
		));
	});
	sidebar.insert(ul);
	forum_info.insert(container);
}

if($$(".forum_info").length){
	var s = document.createElement("script");
	s.setAttribute("type", "text/javascript");
	s.innerHTML = "(" + createVoices.toString() + ")();";
	document.body.appendChild(s);
	setTimeout(function(){document.body.removeChild(s);}, 100);
}