您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Change the color of the username to match with the desired user color
当前为
- // ==UserScript==
- // @name Twitter - Match username with user color
- // @copyright hzmen1 <hzmen1@hotmail.com>
- // @version 2.0
- // @namespace https://greasyfork.org/users/11517
- // @homepageURL https://greasyfork.org/scripts/9952
- // @description Change the color of the username to match with the desired user color
- // @match *://twitter.com/*
- // @include /^https?://twitter.com
- // @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js
- // @grant none
- // @author hzmen1
- // @license (CC) by-nc-sa 3.0
- // @run-at document-end
- // ==/UserScript==
- (function(win){var main=function(){Array.prototype.slice.call(win.document.querySelectorAll('#page-container a.twitter-timeline-link[href*="t.co"]'),0).forEach(function(el){if(el.dataset && el.dataset.expandedUrl){el.href=el.dataset.expandedUrl;}});};main();win.onscroll=main;})(window);
- setInterval(function(){someFunction()},25);
- function someFunction(){
- k=$(".u-textUserColor").css('color');
- $('.ProfileHeaderCard-nameLink,.ProfileNameTruncated-link').each(function(){$(this).removeClass('u-textInheritColor');});
- $('.bird-topbar-etched,.ProfileHeaderCard-location,.DashboardProfileCard-name,.Icon--person,.PhotoRail-heading,.ProfileHeaderCard-joinDate,.ProfileHeaderCard-url,.ProfileHeaderCard-birthdate,.ProfileHeaderCard-vineProfile,.ProfileNameTruncated-link,.stream-end,.back-to-top,.player-container,.Icon--mediaplay,.OldMedia-attributionName,.Icon--verified,.Icon--protected,.Icon--translator,.twitter-atreply,.twitter-hashtag,.GridTimeline-footerIcon').each(function(){$(this).addClass('u-textUserColor');}
- );
- $('.avatar,.ProfileAvatar,.hovercard.profile-card .ProfileCard-avatarImage,.DashboardProfileCard-avatarImage,.DMAvatar-image').each(function(){$(this).addClass('u-borderUserColor');});
- $('.show-more-spinner,#trend-locations-loading,.DMConversation-spinner,.DMInbox-spinner,.pushstate-spinner,.spinner-bigger,.stream-end-inner .spinner,.GridTimeline .has-more-items .spinner').each(function(){$(this).css({ "border-left-color":k})});
- $('.ProfileNameTruncated-link').addClass('bypassuser');
- $('.ProfileNameTruncated-link').removeClass('ProfileNameTruncated-link');
- $('.util-link-complex-target').removeClass('util-link-complex-target');
- $('.twitter-atreply').removeClass('pretty-link');
- $('.twitter-hashtag').removeClass('pretty-link');
- $('.avatar').addClass('u-bgUserColor');
- }