Twitter - Match username with user color

Change the color of the username to match with the desired user color

当前为 2015-07-18 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name           Twitter - Match username with user color
// @copyright      hzmen1 <[email protected]>
// @version        1.5.1
// @namespace      https://greasyfork.org/users/11517
// @homepageURL    https://greasyfork.org/scripts/9952
// @require        https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js
// @description    Change the color of the username to match with the desired user color
// @include        /^https?://twitter.com
// @author         hzmen1
// @license        (CC) by-nc-sa 3.0
// @run-at         document-end
// ==/UserScript==

$("a").click(function(){someFunction();});
$(document).ready(function(){someFunction();});

var url= $(location).attr('href');
setInterval(function(){someFunction()},2000);

function someFunction(){
$('.ProfileHeaderCard-nameLink').removeClass('u-textInheritColor');
$('.ProfileNameTruncated-link').removeClass('u-textInheritColor');
$('.ProfileNameTruncated-link').addClass('u-textUserColor');
$('.ProfileNameTruncated-link').addClass('bypassuser');
$('.ProfileNameTruncated-link').removeClass('ProfileNameTruncated-link');
    
$('.Icon--verified').addClass('u-textUserColor');

$('.twitter-atreply').removeClass('pretty-link');
$('.twitter-hashtag').removeClass('pretty-link');
$('.twitter-atreply').addClass('u-textUserColor');
$('.twitter-hashtag').addClass('u-textUserColor');

    
$('.ProfileHeaderCard-location').addClass('u-textUserColor');
$('.bird-topbar-etched').addClass('u-textUserColor');
$('.DashboardProfileCard-name').addClass('u-textUserColor');
$('.Icon--person').addClass('u-textUserColor');
$('.PhotoRail-heading').addClass('u-textUserColor');
$('.ProfileHeaderCard-joinDate').addClass('u-textUserColor');
$('.ProfileHeaderCard-url').addClass('u-textUserColor');
$('.ProfileHeaderCard-birthdate').addClass('u-textUserColor');
$('.ProfileAvatar').addClass('u-borderUserColor');
$('.DashboardProfileCard-avatarImage').addClass('u-borderUserColor');
}