Twitter - Match username with user color

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

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

  1. // ==UserScript==
  2. // @name Twitter - Match username with user color
  3. // @copyright hzmen1 <hzmen1@hotmail.com>
  4. // @version 1.5.1
  5. // @namespace https://greasyfork.org/users/11517
  6. // @homepageURL https://greasyfork.org/scripts/9952
  7. // @require https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js
  8. // @description Change the color of the username to match with the desired user color
  9. // @include /^https?://twitter.com
  10. // @author hzmen1
  11. // @license (CC) by-nc-sa 3.0
  12. // @run-at document-end
  13. // ==/UserScript==
  14.  
  15. $("a").click(function(){someFunction();});
  16. $(document).ready(function(){someFunction();});
  17.  
  18. var url= $(location).attr('href');
  19. setInterval(function(){someFunction()},1600);
  20.  
  21. function someFunction(){
  22. $('.ProfileHeaderCard-nameLink').removeClass('u-textInheritColor');
  23. $('.ProfileNameTruncated-link').removeClass('u-textInheritColor');
  24. $('.ProfileNameTruncated-link').addClass('u-textUserColor');
  25. $('.ProfileNameTruncated-link').addClass('bypassuser');
  26. $('.ProfileNameTruncated-link').removeClass('ProfileNameTruncated-link');
  27. $('.Icon--verified').addClass('u-textUserColor');
  28. $('.Icon--protected').addClass('u-textUserColor');
  29. $('.Icon--translator').addClass('u-textUserColor');
  30.  
  31. $('.twitter-atreply').removeClass('pretty-link');
  32. $('.twitter-hashtag').removeClass('pretty-link');
  33. $('.twitter-atreply').addClass('u-textUserColor');
  34. $('.twitter-hashtag').addClass('u-textUserColor');
  35.  
  36. $('.ProfileHeaderCard-location').addClass('u-textUserColor');
  37. $('.bird-topbar-etched').addClass('u-textUserColor');
  38. $('.DashboardProfileCard-name').addClass('u-textUserColor');
  39. $('.Icon--person').addClass('u-textUserColor');
  40. $('.PhotoRail-heading').addClass('u-textUserColor');
  41. $('.ProfileHeaderCard-joinDate').addClass('u-textUserColor');
  42. $('.ProfileHeaderCard-url').addClass('u-textUserColor');
  43. $('.ProfileHeaderCard-birthdate').addClass('u-textUserColor');
  44. $('.ProfileAvatar').addClass('u-borderUserColor');
  45. $('.DashboardProfileCard-avatarImage').addClass('u-borderUserColor');
  46. }