ShadeRoot Twitter

Eye-friendly magic in your browser for Twitter

当前为 2016-11-06 提交的版本,查看 最新版本

  1. //
  2. // Written by Glenn Wiking
  3. // Script Version: 0.1.1b
  4. // Date of issue: 06/11/16
  5. // Date of resolution: 06/11/16
  6. //
  7. // ==UserScript==
  8. // @name ShadeRoot Twitter
  9. // @namespace SRTW
  10. // @version 0.1.1b
  11. // @grant none
  12. // @icon https://i.imgur.com/Qnk5qPF.png
  13. // @description Eye-friendly magic in your browser for Twitter
  14.  
  15. // @include http://twitter.*
  16. // @include https://twitter.*
  17. // @include http://*twitter.*
  18. // @include https://*twitter.*
  19. // @include http://*.twitter.*
  20. // @include https://*.twitter.*
  21. // @include http://blog.twitter.*
  22. // @include https://blog.twitter.*
  23.  
  24. // ==/UserScript==
  25.  
  26. function ShadeRootTwitter(css) {
  27. var head, style;
  28. head = document.getElementsByTagName('head')[0];
  29. if (!head) { return; }
  30. style = document.createElement('style');
  31. style.type = 'text/css';
  32. style.innerHTML = css;
  33. head.appendChild(style);
  34. }
  35.  
  36. ShadeRootTwitter(
  37. // BG COLOR 1 // TEXT COLOR 1
  38. 'html, body, .AppContent, .ProfilePage {background: #04111A !important; color: #98B5C8 !important;}'
  39. +
  40. '.message {background: #061D2C !important; box-shadow: 0px 2px 4px rgba(14, 87, 149, 0.3) !important;}'
  41. +
  42. 'input, textarea:not(.TokenizedMultiselect-input), samp, code div[contenteditable], .t1-select, .js-stream-tweet, #user_description, .rc-anchor-light, .rc-anchor-normal, .front-signin, .front-signup {background-color: #061D2C !important; border: 1px solid #1377B4 !important; color: rgb(162, 205, 234) !important;}'
  43. +
  44. 'input:focus, textarea:focus, div[contenteditable="true"]:focus, div.fake-focus[contenteditable="true"], .WidgetsSelector-title, .is-dark {color: #BFE0F6 !important;}'
  45. +
  46. '.content-header .header-inner, .content-no-header .no-header-inner, .ProfileNav-item--userActions, .ModalDialog-content, header, .Header, .sticky-cta {background-color: #061D2C !important;}'
  47. +
  48. '.ProfileNav-item--userActions {height: 58px !important; padding: 11px 0px 0px 2px !important;}'
  49. +
  50. '.module .list-link:hover, .module .active .list-link, .stream-end-inner, .ProfileCanopy-navBar, .DMButtonBar {background-color: #061D2C !important;}'
  51. +
  52. '.list-link:hover, .WhoToFollow, .stream-item:not(.no-header-background-module), .DMActivity-body {background-color: #0F2D47 !important;}'
  53. +
  54. '.ProfileCanopy-navBar, .front-signup h2, .front-signin h2, .new-tweets-bar {border-top: 1px solid #1377B4 !important; border-bottom: 1px solid #1377B4 !important;}'
  55. +
  56. 'img, .btn-cta, .ProfileCard-bg, .home .page-footer, video, .error-msg, .rosetta-icon-media-play {opacity: .85 !important;}'
  57. + // BORDER COLOR 1
  58. '.file-upload-section {border: 1px solid #1377B4 !important;}'
  59. +
  60. '.TokenizedMultiselect-input, .front-signup h2, .front-signin h2 {background-color: #0F2D47 !important;}'
  61. +
  62. '.ProfileCard, .NotificationsEmptyModule, .ListCreationModule {background-color: #061D2C !important; border: 1px solid #0E4F86 !important;}'
  63. +
  64. '.u-bgUserColorLighter, .u-bgUserColorLightest, .RichEditor div[contenteditable], .RichEditor div[contenteditable]:focus, .RichEditor div.fake-focus[contenteditable] {background: #0E4F86 !important;}'
  65. +
  66. '.caret-inner {border-bottom: 9px solid #0F2D47 !important;}'
  67. + // BG COLOR 2
  68. '.global-nav-inner, .page-canvas, .header-nav, .breadcrumbs, footer, .ProfileCard-avatarLink, .Footer-adsModule, .stream-item:not(.no-header-background-module) {background: #082538 !important;}'
  69. +
  70. '.ProfileAvatar, .ProfileAvatarEditing {background: #082538 !important; border: 5px solid #266183 !important;}'
  71. +
  72. '.dropdown-menu li > a:hover, .dropdown-menu li > a:focus, .dropdown-menu .dropdown-link:hover, .dropdown-menu .dropdown-link:focus, .dropdown-menu .dropdown-link.is-focused, .dropdown-menu li:hover .dropdown-link, .dropdown-menu li:focus .dropdown-link, .dropdown-menu .typeahead-recent-search-item.selected, .dropdown-menu .typeahead-saved-search-item.selected, .dropdown-menu .selected a, .dropdown-menu .dropdown-link.selected, .DMPopoverMenu, .DMPopover-content, .modal-content {background: #061D2C !important;}'
  73. +
  74. '.DMPopover-content.Caret::after {border-color: #061D2C !important;}'
  75. + // BG COLOR 3
  76. '.mobile, .contact-support, .has-sms, .dropdown-menu, .content-inner, .list-link, body.home section.new-features {background-color: #0F2D47 !important;}'
  77. + // BG COLOR 4
  78. '.u-bgUserColor, .u-bgUserColorHover:hover, .u-bgUserColorHover:focus, .top-timeline-tweetbox .timeline-tweet-box, .content-searchbar, .modal-header {background-color: #054D7A !important;}'
  79. + // TEXT COLOR 1
  80. '.nav > li, .remember, .t1-label, .tweet-text, .ProfileNameTruncated-link, .ProfileCard-bio, .ButtonSelectModal-title, .DMPopoverMenu-button, .front-signup h2 strong, .front-signin h2 strong {color: #98B5C8 !important;}'
  81. +
  82. '.ProfileHeaderCard-birthdateText, .ProfileHeaderCard-joinDateText, .ProfileHeaderCard-locationText, .ProfileHeaderCard-onlineHoursText, .ProfileHeaderCard-responsivenessLevelText, .ProfileHeaderCard-vineProfileText, .ProfileHeaderCard-periscopeProfileText, .ProfileNav-label, .trend-location, .js-nav, .trend-item-stats {color: #98B5C2 !important;}'
  83. +
  84. '.Trends .context-trend-item .trend-item-stats, .DMActivity-title, .DMTypeaheadHeader, .UserPolicy p, label {color: #98B5C2 !important;}'
  85. + // LINK COLOR 1
  86. 'a {color: #1B95E0 !important;}'
  87. + // LINK COLOR 2 == LOGO COLOR
  88. '.fullname {color: #1DA1F2 !important;}'
  89. +
  90. '.twitter-hashtag > *, .pretty-link > *, .find-friends-list .source {color: #09A5FB !important;}'
  91. +
  92. '.global-nav--newLoggedOut a, .global-nav--newLoggedOut a:hover, .global-nav--newLoggedOut a:focus, .global-nav--newLoggedOut a:active {color: #1DA1F2 !important;}'
  93. +
  94. '.typeahead strong, h1, h2, h3, h4, h5, h6, .message-text, .QuoteTweet-fullname, .ProfileNav-item.is-active .ProfileNav-value, .ProfileNav-item.is-active:hover .ProfileNav-value, .modal-header {color: #98B5C8 !important;}'
  95. +
  96. '.page-canvas {box-shadow: 0px 0px 225px #050D1B !important;}'
  97. + // ARTICLE
  98. '.info, article, .article, .block-message {background: #0D2B48 !important; border: 1px solid #0E4F86 !important; color: rgba(136, 185, 227, 0.8) !important;}'
  99. + // SINGLE BORDER 1
  100. '#feedback_vote h2.title::before, .list-link, .DashboardProfileCard-bg, .typeahead .dropdown-inner > .has-results ~ .has-results, .typeahead .dropdown-inner > .has-items ~ .has-items, .DMConversation-composer, .modal-footer {border-top: 1px solid #266183 !important;}'
  101. +
  102. '.stream-item + .stream-item.separated-module:not(.no-header-background-module), .stream-item.separated-module + .stream-item:not(.no-header-background-module), .PromptbirdPrompt-streamItem.separated-module + .stream-item:not(.no-header-background-module) {border-top: 1px solid #266183 !important;}'
  103. +
  104. '.content-header .header-inner, .content-no-header .no-header-inner, .no-stream-end, .stream-item-activity-notification, .DMActivity-header, .ProfileClusterFollow, .modal-header, .find-friends-list li, .app {border-bottom: 1px solid #266183 !important;}'
  105. +
  106. '.content-header, .content-no-header, hr, .WhoToFollow, .TokenizedMultiselect-inputContainer, .is-highlighted {border-color: #266183 !important;}'
  107. +
  108. '.content-inner, .stream-item:not(.no-header-background-module) {border-left: 1px solid #266183 !important; border-right: 1px solid #266183 !important;}'
  109. +
  110. '.DashboardProfileCard, .flex-module, .Trends, .u-bgUserColorLightest, .find-friends-list li:hover {border-color: #266183 !important; background: #061D2C !important;}'
  111. +
  112. '.DashboardProfileCard-bg, .dropdown-divider, .cta, .content-searchbar, .content-searchbar, .account, .ProfileCard-bg, .cd-content ul li a h5 {border-bottom: 1px solid #305E7E !important;}'
  113. + // TEXT COLOR 2
  114. 'legend, .t1-legend, .ProfileHeading-toggleItem.is-active, .ProfileHeading-toggleItem.is-active:hover, .ProfileHeading-toggleItem.is-active:focus {color: #43A7EA !important;}'
  115. + // BUTTON COLOR
  116. '.btn, .white {color: #C6DFF0 !important; background-color: #2A8CCB !important; background-image: linear-gradient(#2F556E, #093465) !important; border: 1px solid #123C5A !important;}'
  117. +
  118. '.btn:hover, .follow-combo.open .btn-user-actions, .dropdown.open .user-dropdown {background-color: #1A78BD !important; background-image: linear-gradient(#1F7CD5, #145FC0) !important; border-color: #3F99D8 !important; color: #98B5C8 !important;}'
  119. +
  120. '.btn:focus, .btn.focus, .front-signup .btn, .front-signin .submit, .FollowButton, .follow-button {background: #1E63A7 !important; border-color: rgb(23, 77, 117) !important; box-shadow: -1px 0px 0px 1px rgba(0, 0, 0, 0), 0px 0px 0px 3px rgba(0, 0, 0, 0) !important;}'
  121. +
  122. '.list-link, .TwitterCard-container, .u-borderUserColorLighter {border-color: #204E7B #14364E !important;}'
  123. +
  124. '.js-nav-link li .js-nav, .modal-table th, .alert p, b, .TweetAuthor-name, .Identity-name, .customisable-highlight, .Tweet-text, .e-entry-title {color: #6A9FBF !important;}'
  125. +
  126. '.tweet, .EmbeddedTweet {background-color: #0F457A !important; border: 1px solid #1D74B3 !important;}'
  127. +
  128. '.tweet-counter, .front-signin .remember, .front-signin .forgot, .front-signin .separator, .front-signup h2, .front-signin h2 {text-shadow: 0px 1px 1px rgba(22, 69, 140, 0.8) !important;}'
  129. +
  130. '.RichEditor, .QuoteTweet, .timeline-tweet-box, a.home-category {border: 1px solid #071723 !important;}'
  131. +
  132. '.RichEditor div[contenteditable], .RichEditor div[contenteditable]:focus, .RichEditor div.fake-focus[contenteditable] {border-radius: 3px; background: #04111A !important;}'
  133. +
  134. '.stream-end-item, .stream-end, .stream-loading, .stream-placeholder {border-color: -moz-use-text-color #195E8F #0D3D6C !important;}'
  135. + // OVERLAY
  136. '.ProfilePage-editingOverlay {background-color: #020911 !important;}'
  137. +
  138. '.u-boxShadowInsetUserColorHover:hover, .u-boxShadowInsetUserColorHover:focus {box-shadow: 0px 0px 0px 5px #0A527E inset !important;}'
  139. +
  140. '.u-borderUserColorLight, .u-borderUserColorLightFocus:focus, .u-borderUserColorLightHover:hover, .u-borderUserColorLightHover:focus {border-color: #0F3266 !important;}'
  141. +
  142. '.BirthdateSelect-button, .EmojiBar-icon, .EmojiBar-suggestions, .ProfileClusterFollow, .modal-header {background-color: #115690 !important;}'
  143. +
  144. '.u-bgUserColorLightest, .DMComposer-container {background: #061D2C !important;}'
  145. +
  146. '.ProfileHeaderEditing-addHeaderHelp, .ProfileHeaderEditing-changeHeaderHelp, .ProfileHeaderEditing-dropHeaderHelp, .ProfileHeaderEditing-iframeSavingHelp, .PlayerCard-playButton {opacity: .5 !important;}'
  147. +
  148. '.stream .tweet {background-color: #061D2C !important; border: 1px solid #123150 !important;}'
  149. +
  150. '.home-tweet-box, .LiveVideo-tweetBox, .RetweetDialog-commentBox, .WebToast-box--altColor, .NotificationsHeadingContent, .ProfileHeading-content, .DMActivity-header, .new-tweets-bar {background-color: #054D7A !important; border: #054D7A !important;}'
  151. +
  152. '.rosetta-icon-media-play-fill, .rosetta-icon-media-play-fill::before, .rosetta-icon::before {opacity: 0.75;}'
  153. +
  154. '.Footer-adsModule, .import-prompt, .stream ol li:nth-child(even) > div {background-color: #03101A !important;}'
  155. +
  156. '.TwitterCard-container--clickable:hover {background: #0F365C !important; border-color: rgba(22, 93, 147, 0.5) !important;}'
  157. +
  158. '.SummaryCard-content, .find-friends-top-subheader, .find-friends-bottom-subheader, .find-friends-sources, .nav-drawer.active {background: rgb(13, 65, 110) !important;}'
  159. +
  160. '.SummaryCard-content {padding: 0.85em !important;}'
  161. +
  162. '.DashboardProfileCard-avatarLink {background-color: #0D263C !important; opacity: .92 !important;}'
  163. +
  164. 'body.home > header ul.search-terms > li {background-color: rgba(3, 14, 27, 0.4) !important;}'
  165. +
  166. '.home .profile-menu {background: rgba(20, 47, 66, 0.4) !important; padding: 0.5em !important; border-radius: 3px !important;}'
  167. +
  168. 'blockquote {border-left: 5px solid #115CA7 !important;}'
  169. +
  170. 'body.home .home-categories li a.home-category:hover, body.home .home-categories li a.home-category:active {background-color: #112A44 !important;}'
  171. +
  172. '.page-footer .page-footer-wrapper {background: transparent linear-gradient(to bottom, #06243B 0%, #0D3A6C 100%) !important;}'
  173. +
  174. '.search-results .load-more-results li article {padding: 0.8em 1.2em !important;}'
  175. +
  176. '.content-searchbar .search-query, .text-input, .front-signup h2, .front-signin h2 {box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.05) inset, 0px 1px 0px #163E6B !important;}'
  177. +
  178. '.QuoteTweet--unavailable {background: #0F5189 !important;}'
  179. +
  180. '.is-highlighted {background-color: #175386 !important;}'
  181. +
  182. '.DMConversation-composer {box-shadow: 0px 1px 0px rgba(8, 23, 42, 0.85) inset !important;}'
  183. +
  184. '.u-borderUserColorLighter, .ProfileCanopy-header {border: none !important; opacity: .8;}'
  185. +
  186. '.u-borderUserColorLightest, .DMConversation-composer, .ProfileTweetbox {background-image: linear-gradient(#1F7CD5, #145FC0) !important;}'
  187. +
  188. '.DMNotice--error {background: #470717 !important;}'
  189. +
  190. '.sc-key {color: #B9DCF3 !important; background-color: #3A7BCF !important; background-image: linear-gradient(#1B7ABA, #145CAD) !important; border: 1px solid #539ACF !important; box-shadow: 0px 1px 0px #104E83 inset, 0px 1px 0px #0E2535 !important;}'
  191. +
  192. '.alert, .u-bgUserColorLighter, .ProfileHeaderCardEditing--extraFields {background-image: linear-gradient(#185690, #25496B) !important; text-shadow: 0px 1px 1px rgba(20, 47, 68, 0.3) !important; border-width: 0 !important;}'
  193. +
  194. '.alert p, .UserPolicy p, p, .Field-items-item, .footer-bottom, .lang-selection {color: #A9D2ED !important;}'
  195. +
  196. '.modal-header {background: #020911 !important;}'
  197. +
  198. '*[style="background-color: rgb(238,238,238);"] {background: #05274E !important;}'
  199. +
  200. '.ProfileHeaderCardEditing {background-image: linear-gradient(#0E3F68, #08264E) !important;}'
  201. +
  202. '.ProfileHeaderCardEditing--extraFields {background-image: linear-gradient(#071B2D, #072553) !important;}'
  203. +
  204. '.front-page-photo-set .companion-tweet .text, .companion-tweet a, .text .tweet-text, .front-welcome-text p, .companion-tweet .username {text-shadow: 0 0 5px #000; font-size: 1.1em !important; text-decoration: none !important;}'
  205. +
  206. '.signup-btn.btn {text-shadow: none !important;}'
  207. +
  208. '.masthead h1 {color: #253950 !important;}'
  209. +
  210. '.background-white {background-color: #082538 !important;}'
  211. +
  212. '.comp-container button.yellow {background-color: #0C53A4 !important;}'
  213. +
  214. '.comp-container button.yellow:hover {background-color: #0B6BD7 !important;}'
  215. +
  216. '.g-recaptcha iframe {opacity: .55 !important;}'
  217. +
  218. '.header-right .avatar img, .header-right .search .search-icon {margin: 9px !important;}'
  219. +
  220. '.header-left .logo {margin: 5px !important;}'
  221. +
  222. '.nav-drawer header {border-radius: 3px !important;}'
  223. +
  224. 'b {color: #6A9FBF !important;}'
  225. +
  226. '.dashboard .Footer .js-items-container::after {content: "Warning: Some of these pages are deliberately resistant to the Shaderoot stylesheet."; display: block !important; padding: .8em 0 0 0 !important; font-size: .9em !important;}'
  227. +
  228. '.front-page-photo-set .background-companion-tweets {background: rgba(11, 19, 35, 0.4) !important; border-radius: 3px !important;}'
  229. +
  230. '.front-page-photo-set .footer.inline-list {background: rgba(11, 19, 35, 0.4) !important; border-radius: 3px !important; padding: 0.75em;}'
  231. +
  232. '.front-page-photo-set .companion-tweet .username {margin-top: 2em !important;}'
  233. +
  234. '.wtf-module .import-prompt .service {border: 1px solid #136ABF !important; background: #7AA7DA !important;}'
  235. +
  236. '.new-tweets-bar:hover {background-color: #081f30 !important;}'
  237. +
  238. '.stream-end-item, .stream-end, .stream-loading, .stream-placeholder, .timeline-end > div {border-color: #195E8F #0D3D6C !important;}'
  239. );

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址