ShadeRoot Twitter

Eye-friendly magic in your browser for Twitter

Устаревшая версия за 06.11.2016. Перейдите к последней версии.

Чтобы установить этот скрипт, вы сначала должны установить расширение браузера, например Tampermonkey, Greasemonkey или Violentmonkey.

Чтобы установить этот скрипт, вы сначала должны установить расширение браузера, например Tampermonkey или Violentmonkey.

Чтобы установить этот скрипт, вы сначала должны установить расширение браузера, например Tampermonkey или Violentmonkey.

Чтобы установить этот скрипт, вы сначала должны установить расширение браузера, например Tampermonkey или Userscripts.

Чтобы установить этот скрипт, сначала вы должны установить расширение браузера, например Tampermonkey.

Чтобы установить этот скрипт, вы должны установить расширение — менеджер скриптов.

(у меня уже есть менеджер скриптов, дайте мне установить скрипт!)

Чтобы установить этот стиль, сначала вы должны установить расширение браузера, например Stylus.

Чтобы установить этот стиль, сначала вы должны установить расширение браузера, например Stylus.

Чтобы установить этот стиль, сначала вы должны установить расширение браузера, например Stylus.

Чтобы установить этот стиль, сначала вы должны установить расширение — менеджер стилей.

Чтобы установить этот стиль, сначала вы должны установить расширение — менеджер стилей.

Чтобы установить этот стиль, сначала вы должны установить расширение — менеджер стилей.

(у меня уже есть менеджер стилей, дайте мне установить скрипт!)

//
// Written by Glenn Wiking
// Script Version: 0.1.0
// Date of issue: 06/11/16
// Date of resolution: 06/11/16
//
// ==UserScript==
// @name        ShadeRoot Twitter
// @namespace   SRTW
// @version     0.1.0
// @grant       none
// @icon        https://i.imgur.com/Qnk5qPF.png
// @description Eye-friendly magic in your browser for Twitter

// @include     http://twitter.*
// @include     https://twitter.*
// @include     http://*.twitter.*
// @include     https://*.twitter.*

// ==/UserScript==

function ShadeRootTwitter(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}

ShadeRootTwitter(
	  // BG COLOR 1 // TEXT COLOR 1
	'html, body, .AppContent, .ProfilePage {background: #04111A !important; color: #98B5C8 !important;}'
	+
	'.message {background: #061D2C !important; box-shadow: 0px 2px 4px rgba(14, 87, 149, 0.3) !important;}'
	+
	'input, textarea:not(.TokenizedMultiselect-input), samp, code div[contenteditable], .t1-select, .js-stream-tweet, #user_description {background-color: #061D2C !important; border: 1px solid #1377B4 !important; color: rgb(162, 205, 234) !important;}'
	+
	'input:focus, textarea:focus, div[contenteditable="true"]:focus, div.fake-focus[contenteditable="true"], .WidgetsSelector-title, .is-dark {color: #BFE0F6 !important;}'
	+
	'.content-header .header-inner, .content-no-header .no-header-inner, .ProfileNav-item--userActions, .ModalDialog-content, header, .Header {background-color: #061D2C !important;}'
	+
	'.ProfileNav-item--userActions {height: 58px !important; padding: 11px 0px 0px 2px !important;}'
	+
	'.module .list-link:hover, .module .active .list-link, .stream-end-inner, .ProfileCanopy-navBar, .DMButtonBar {background-color: #061D2C !important;}'
	+
	'.list-link:hover, .WhoToFollow, .stream-item:not(.no-header-background-module), .DMActivity-body {background-color: #0F2D47 !important;}'
	+
	'.ProfileCanopy-navBar {border-top: 1px solid #1377B4 !important; border-bottom: 1px solid #1377B4 !important;}'
	+
	'img, .btn-cta, .ProfileCard-bg, .home .page-footer {opacity: .85 !important;}'
	+ // BORDER COLOR 1
	'.file-upload-section {border: 1px solid #1377B4 !important;}'
	+
	'.TokenizedMultiselect-input {background-color: #0F2D47 !important;}'
	+
	'.ProfileCard, .NotificationsEmptyModule, .ListCreationModule {background-color: #061D2C !important; border: 1px solid #0E4F86 !important;}'
	+
	'.u-bgUserColorLighter, .u-bgUserColorLightest, .RichEditor div[contenteditable], .RichEditor div[contenteditable]:focus, .RichEditor div.fake-focus[contenteditable] {background: #0E4F86 !important;}'
	+
	'.caret-inner {border-bottom: 9px solid #0F2D47 !important;}'
	+ // BG COLOR 2
	'.global-nav-inner, .page-canvas, .header-nav, .breadcrumbs, footer, .ProfileCard-avatarLink, .Footer-adsModule, .stream-item:not(.no-header-background-module) {background: #082538 !important;}'
	+
	'.ProfileAvatar, .ProfileAvatarEditing {background: #082538 !important; border: 5px solid #266183 !important;}'
	+
	'.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;}'
	+
	'.DMPopover-content.Caret::after {border-color: #061D2C !important;}'
	+ // BG COLOR 3
	'.mobile, .contact-support, .has-sms, .dropdown-menu, .content-inner, .list-link, body.home section.new-features {background-color: #0F2D47 !important;}'
	+ // BG COLOR 4
	'.u-bgUserColor, .u-bgUserColorHover:hover, .u-bgUserColorHover:focus, .top-timeline-tweetbox .timeline-tweet-box, .content-searchbar, .modal-header {background-color: #054D7A !important;}'
	+ // TEXT COLOR 1
	'.nav > li, .remember, .t1-label, .tweet-text, .ProfileNameTruncated-link, .ProfileCard-bio, .ButtonSelectModal-title, .DMPopoverMenu-button {color: #98B5C8 !important;}'
	+
	'.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;}'
	+
	'.Trends .context-trend-item .trend-item-stats, .DMActivity-title, .DMTypeaheadHeader, .UserPolicy p {color: #98B5C2 !important;}'
	+ // LINK COLOR 1
	'a {color: #1B95E0 !important;}'
	+ // LINK COLOR 2 == LOGO COLOR
	'.fullname {color: #1DA1F2 !important;}'
	+
	'.twitter-hashtag > *, .pretty-link > *, .find-friends-list .source {color: #09A5FB !important;}'
	+
	'.global-nav--newLoggedOut a, .global-nav--newLoggedOut a:hover, .global-nav--newLoggedOut a:focus, .global-nav--newLoggedOut a:active {color: #1DA1F2 !important;}'
	+
	'.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;}'
	+
	'.page-canvas {box-shadow: 0px 0px 225px #050D1B !important;}'
	+ // ARTICLE
	'.info, article, .article, .block-message {background: #0D2B48 !important; border: 1px solid #0E4F86 !important; color: rgba(136, 185, 227, 0.8) !important;}'
	+ // SINGLE BORDER 1
	'#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;}'
	+
	'.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;}'
	+
	'.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;}'
	+
	'.content-header, .content-no-header, hr, .WhoToFollow, .TokenizedMultiselect-inputContainer, .is-highlighted {border-color: #266183 !important;}'
	+
	'.content-inner, .stream-item:not(.no-header-background-module) {border-left: 1px solid #266183 !important; border-right: 1px solid #266183 !important;}'
	+
	'.DashboardProfileCard, .flex-module, .Trends, .u-bgUserColorLightest, .find-friends-list li:hover {border-color: #266183 !important; background: #061D2C !important;}'
	+
	'.DashboardProfileCard-bg, .dropdown-divider, .cta, .content-searchbar, .content-searchbar, .account, .ProfileCard-bg {border-bottom: 1px solid #305E7E !important;}'
	+ // TEXT COLOR 2
	'legend, .t1-legend, .ProfileHeading-toggleItem.is-active, .ProfileHeading-toggleItem.is-active:hover, .ProfileHeading-toggleItem.is-active:focus {color: #43A7EA !important;}'
	+ // BUTTON COLOR
	'.btn {color: #C6DFF0 !important; background-color: #2A8CCB !important; background-image: linear-gradient(#2F556E, #093465) !important; border: 1px solid #123C5A !important;}'
	+
	'.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;}'
	+
	'.btn:focus, .btn.focus {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;}'
	+
	'.list-link, .TwitterCard-container, .u-borderUserColorLighter {border-color: #204E7B #14364E !important;}'
	+
	'.js-nav-link li .js-nav, .modal-table th, , .alert p {color: #6A9FBF !important;}'
	+
	'.tweet {background-color: #0F457A !important; border: 1px solid #1D74B3 !important;}'
	+
	'.tweet-counter {text-shadow: 0px 1px 1px rgba(22, 69, 140, 0.8) !important;}'
	+
	'.RichEditor, .QuoteTweet, .timeline-tweet-box, a.home-category {border: 1px solid #071723 !important;}'
	+
	'.RichEditor div[contenteditable], .RichEditor div[contenteditable]:focus, .RichEditor div.fake-focus[contenteditable] {border-radius: 3px; background: #04111A !important;}'
	+
	'.stream-end-item, .stream-end, .stream-loading, .stream-placeholder {border-color: -moz-use-text-color #195E8F #0D3D6C !important;}'
	+ // OVERLAY
	'.ProfilePage-editingOverlay {background-color: #020911 !important;}'
	+
	'.u-boxShadowInsetUserColorHover:hover, .u-boxShadowInsetUserColorHover:focus {box-shadow: 0px 0px 0px 5px #0A527E inset !important;}'
	+
	'.u-borderUserColorLight, .u-borderUserColorLightFocus:focus, .u-borderUserColorLightHover:hover, .u-borderUserColorLightHover:focus {border-color: #0F3266 !important;}'
	+
	'.BirthdateSelect-button, .EmojiBar-icon, .EmojiBar-suggestions, .ProfileClusterFollow, .modal-header {background-color: #115690 !important;}'
	+
	'.u-bgUserColorLightest, .DMComposer-container {background: #061D2C !important;}'
	+
	'.ProfileHeaderEditing-addHeaderHelp, .ProfileHeaderEditing-changeHeaderHelp, .ProfileHeaderEditing-dropHeaderHelp, .ProfileHeaderEditing-iframeSavingHelp, .PlayerCard-playButton {opacity: .5 !important;}'
	+
	'.stream .tweet {background-color: #061D2C !important; border: 1px solid #123150 !important;}'
	+
	'.home-tweet-box, .LiveVideo-tweetBox, .RetweetDialog-commentBox, .WebToast-box--altColor, .NotificationsHeadingContent, .ProfileHeading-content, .DMActivity-header {background-color: #054D7A !important; border: #054D7A !important;}'
	+
	'.rosetta-icon-media-play-fill, .rosetta-icon-media-play-fill::before, .rosetta-icon::before {opacity: 0.75;}'
	+
	'.Footer-adsModule, .import-prompt, .stream ol li:nth-child(even) > div {background-color: #03101A !important;}'
	+
	'.TwitterCard-container--clickable:hover {background: #0F365C !important; border-color: rgba(22, 93, 147, 0.5) !important;}'
	+
	'.SummaryCard-content, .find-friends-top-subheader, .find-friends-bottom-subheader, .find-friends-sources {background: rgb(13, 65, 110) !important;}'
	+
	'.SummaryCard-content {padding: 0.85em !important;}'
	+
	'.DashboardProfileCard-avatarLink {background-color: #0D263C !important; opacity: .92 !important;}'
	+
	'body.home > header ul.search-terms > li {background-color: rgba(3, 14, 27, 0.4) !important;}'
	+
	'.home .profile-menu {background: rgba(20, 47, 66, 0.4) !important; padding: 0.5em !important; border-radius: 3px !important;}'
	+
	'blockquote {border-left: 5px solid #115CA7 !important;}'
	+
	'body.home .home-categories li a.home-category:hover, body.home .home-categories li a.home-category:active {background-color: #112A44 !important;}'
	+
	'.page-footer .page-footer-wrapper {background: transparent linear-gradient(to bottom, #06243B 0%, #0D3A6C 100%) !important;}'
	+
	'.search-results .load-more-results li article {padding: 0.8em 1.2em !important;}'
	+
	'.content-searchbar .search-query {box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.05) inset, 0px 1px 0px #163E6B !important;}'
	+
	'.QuoteTweet--unavailable {background: #0F5189 !important;}'
	+
	'.is-highlighted {background-color: #175386 !important;}'
	+
	'.DMConversation-composer {box-shadow: 0px 1px 0px rgba(8, 23, 42, 0.85) inset !important;}'
	+
	'.u-borderUserColorLighter, .ProfileCanopy-header {border: none !important; opacity: .8;}'
	+
	'.u-borderUserColorLightest, .DMConversation-composer, .ProfileTweetbox {background-image: linear-gradient(#1F7CD5, #145FC0) !important;}'
	+
	'.DMNotice--error {background: #470717 !important;}'
	+
	'.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;}'
	+
	'.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;}'
	+
	'.alert p, .UserPolicy p, p, .Field-items-item {color: #A9D2ED !important;}'
	+
	'.modal-header {background: #020911 !important;}'
	+
	'.ProfileHeaderCardEditing {background-image: linear-gradient(#0E3F68, #08264E) !important;}'
	+
	'.ProfileHeaderCardEditing--extraFields {background-image: linear-gradient(#071B2D, #072553) !important;}'
);