Twitter fixes

Display whole images, display whole tweets, and various enhancements here and there

目前为 2023-12-09 提交的版本,查看 最新版本

  1. /* ==UserStyle==
  2. @name Twitter fixes
  3. @namespace zezombye.dev
  4. @version 1.0.1
  5. @description Display whole images, display whole tweets, and various enhancements here and there
  6. @author Zezombye
  7. @license MIT
  8. ==/UserStyle== */
  9.  
  10. @-moz-document domain("twitter.com") {
  11. /*Display the whole images*/
  12. .r-4gszlv {
  13. background-size: contain;
  14. }
  15. /* Remove image border radius */
  16. article[data-testid="tweet"] > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > div:nth-child(3) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) {
  17. border-radius: 0;
  18. }
  19. /* Remove quote tweet border radius */
  20. article[data-testid="tweet"] > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(2) > div:nth-child(3) > div > div[tabindex="0"][role="link"] {
  21. border-radius: 0;
  22. }
  23. /* Hide "subscribe to premium"*/
  24. div[aria-label="Trending"] > div > div:has(> aside[aria-label="Subscribe to Premium"]) {
  25. display: none;
  26. }
  27. /* Hide trending tab */
  28. div[aria-label="Trending"] > div > div:has(> div > section > div[aria-label="Timeline: Trending now"]) {
  29. display: none;
  30. }
  31. div[aria-label="Trending"] > div > div:has(> div > div > div[aria-label="Loading timeline"]) {
  32. display: none;
  33. }
  34. /* Hide tos, privacy policy, etc */
  35. div[aria-label="Trending"] > div > div:has(> nav[aria-label="Footer"]) {
  36. display: none;
  37. }
  38. /* Hide "new tweets" thing */
  39. div[aria-label="New posts are available. Push the period key to go to the them."] {
  40. display: none;
  41. }
  42. /* Hide "unread items" home icon */
  43. nav[role="navigation"] > a[data-testid="AppTabBar_Home_Link"] div[aria-label="undefined unread items"] {
  44. display: none;
  45. }
  46. /* Dim the opacity of the play button so we can see the full video */
  47. div[aria-label="Play this video"][data-testid="playButton"] {
  48. background-color: rgba(29, 155, 240, 0.5);
  49. }
  50. div[aria-label="Play this video"][data-testid="playButton"]:hover {
  51. background-color: rgba(26, 140, 216, 0.5);
  52. }
  53. /* Remove line clamp on long tweets */
  54. div[data-testid="tweetText"] {
  55. -webkit-line-clamp: unset !important;
  56. }
  57. /* Remove "show more" link */
  58. div[data-testid="tweet-text-show-more-link"] {
  59. display: none;
  60. }
  61. /* Unstick "for you/following" */
  62. div[aria-label="Home timeline"] > div:nth-child(1) {
  63. position: unset;
  64. }
  65. /* Remove post prompt on home timeline */
  66. div[aria-label="Home timeline"] > div:nth-child(3) > div:has(label[data-testid="tweetTextarea_0_label"]) {
  67. display: none;
  68. }
  69. }