TF2R Spookoween

Changes everyone's avatars to skemeletons (or pumpkins if you're a dork) and more!

目前為 2015-06-14 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name       TF2R Spookoween
// @version    2014
// @description Changes everyone's avatars to skemeletons (or pumpkins if you're a dork) and more!
// @namespace  http://niceme.me/
// @include    http://tf2r.com/chat.html
// @include    http://tf2r.com/user/*
// @include    http://tf2r.com/k*
// @copyright  2014+, Gus and the skeleton living inside Gus
// ==/UserScript==
    changeRankColorsToo = false; // set this to false if you're a fag

    avatars = ["qLZagZM","At2czog","mlVvyJP","MZ1qjci","G5yTJjj",
               "qIJ2w3x","Yhv7LH0","Z4s6SSh","AVM1gdk","sqTcqwF",
               "1z33hg7","kLRxDTp","ssaFeTY","snlG2DE","fQwKlfh",
               "dUyMONf","lTWHFTZ","Cb6JcnL","RmSat2s","CrpgU1B",
               "Khk0BAB","QwU8fdG","4v2jbct","fGibHIO","WABMcoU",
               "DgSSPOs","kpueZ7L","ppiYwEI","vqgVRqZ","mxXZ7MU",
               "ZxllDNK","QPdic56","TQfKPs3","n62RL3r","X4lo3XZ",
               "EEHi1e4","36bRrF7"];

    rankColors = ["FF6600", "7519FF"];

    $("#header_left img").attr("src", "http://i.imgur.com/izt4yr5.png").attr("title", "boo");

window.setInterval(function() {
    $(".ufavatar").each(function(){
        avatarNum = parseInt($(this).find('a').attr('href').replace(/[^\d]/g, "").substr(4)) % 37;
        rankNum = (parseInt($(this).find('a').attr('href').replace(/[^\d]/g, "").substr(4)) % 2);
        replaceUrl = 'http://i.imgur.com/' + avatars[avatarNum] + '.jpg';
        replaceText = "<img src=\'" + replaceUrl + "\' width=\'32\' height=\'32\'>";
        avatarUrl = $(this).find('img').attr('src');
        if (avatarUrl != replaceUrl) {
            $(this).find('img').replaceWith(replaceText);
            if (changeRankColorsToo == true) { 
              $(this).siblings().find('a').css("color","#" + rankColors[rankNum]);
            };
        } else {
            return false;
        };
    });
}, 1000); // Increase this number if your performance drops