// ==UserScript==
// @name Telegram Dark
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Telegram Dark Theme
// @author BeknAlyb
// @match https://web.telegram.org/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
function addCss(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);
}
addCss (`
body
{
background: #333;
}
a {
color: #7eaad1;
text-decoration: none;
}
.im_dialogs_scrollable_wrap a.im_dialog:hover,.im_dialogs_scrollable_wrap a.im_dialog_selected
{
border-radius:0;
background:#27292b
}
.im_dialogs_scrollable_wrap .active a.im_dialog
{
border-radius:0;
background-color:#41525f
}
.im_dialogs_scrollable_wrap .active a.im_dialog:hover,.im_dialogs_scrollable_wrap .active a.im_dialog_selected
{
background-color:#41525f
}
a.im_dialog:hover .im_short_message_text, a.im_dialog_selected .im_short_message_text{
color: #999;
}
.im_dialogs_col .nano > .nano-pane > .nano-slider {
background: rgb(60, 60, 60);
}
a.tg_checkbox, p.tg_checkbox {
color: white;
}
.composer_rich_textarea, .composer_textarea
{
box-shadow: 0 1px 0 0 #afafaf;
}
.composer_rich_textarea:focus, .composer_textarea:focus
{
box-shadow: 0 2px 0 0 #afafaf;
}
a.im_dialog .im_dialog_chat_from_wrap,a.im_dialog .im_short_message_media, a.im_dialog .im_short_message_service
{
color: #808080;
}
.im_history_col .nano > .nano-pane > .nano-slider,
.contacts_modal_col .nano > .nano-pane > .nano-slider,
.sessions_modal_col .nano > .nano-pane > .nano-slider,
.stickerset_modal_col .nano > .nano-pane > .nano-slider,
.im_dialogs_modal_col .nano > .nano-pane > .nano-slider {
background: #484848;
}
.im_history_col .nano > .nano-pane,
.contacts_modal_col .nano > .nano-pane,
.sessions_modal_col .nano > .nano-pane,
.stickerset_modal_col .nano > .nano-pane,
.im_dialogs_modal_col .nano > .nano-pane {
background: #333;
}
.stickerset_modal_sticker_wrap:hover {
background: #333;
}
.im_send_panel_wrap {
max-width: 640px;
padding-bottom: 40px;
}
.im_send_form {
max-width: 470px;
left: 70px;
right: 72px;
}
.btn-primary {
color: #fff;
background-color: #2e404e;
border-radius: 3px;
}
.btn-md-primary, .btn-md-primary:focus, .btn-md-primary:hover {
color: #b5ddff;
}
.btn-md:hover {
background: #52606f;
}
.im_submit:hover {
color: #8ed0ff;
background: #3589c500;
}
.im_edit_panel_wrap {
padding: 0px 0 60px;
margin: 0 24px 0 12px;
}
.im_message_selected .im_message_outer_wrap, .md_modal_head, .md_modal_head_simple,
.stickerset_actions_wrap, .im_message_unread_split
{
background: #1d1d1d;
opacity: 1;
}
.dropdown.open .tg_head_btn,
.tg_head_btn:hover {
color: #fff;
text-decoration: none;
background: #141617;
}
.im_history_select_active .im_message_outer_wrap:hover {
background: #1d1d1d;
}
.im_message_author
{
color: #499dd9;
}
.im_message_reply
{
padding-left: 12px;
padding-top: 2px;
padding-bottom: 2px;
padding-right: 0;
}
.im_message_reply_border {
background: #7eaad1;
height: 38px;
width: 2px;
position: absolute;
margin-left: -12px;
margin-top: -1px;
}
.im_message_reply_author {
font-weight: 700;
color: #7eaad1;
line-height: 16px;
margin-bottom: 3px;
}
.im_message_wrap {
max-width: 660px;
padding: 0 0px 0 0px;
margin: 0 20px;
margin-top: 0px;
margin-right: 60px;
margin-bottom: 0px;
margin-left: 40px;
position: static;
}
@media (min-width: 900px) {
.im_message_wrap {
position: relative;
}
.im_message_selected .icon-select-tick,
.im_history_selectable .im_message_outer_wrap:hover .icon-select-tick {
position: absolute;
width: 26px;
height: 26px;
margin: 9px 0 0 590px;
display: block;
background-image: url(../img/icons/IconsetW.png);
background-repeat: no-repeat;
background-position: -9px -481px;
opacity: 0.5;
}
.is_2x .im_message_selected .icon-select-tick,
.is_2x .im_history_selectable .im_message_outer_wrap:hover .icon-select-tick {
background-image: url(../img/icons/IconsetW_2x.png);
background-size: 42px 1171px;
}
.im_message_selected .icon-select-tick {
opacity: 1 !important;
}
.im_grouped_short .icon-select-tick,
.im_grouped_short .im_message_outer_wrap:hover .icon-select-tick {
margin-top: -2px;
}
.im_message_fwd .icon-select-tick,
.im_message_outer_wrap:hover .im_message_fwd .icon-select-tick {
margin-top: 10px;
}
.im_grouped_fwd .icon-select-tick,
.im_grouped_fwd .im_message_outer_wrap:hover .icon-select-tick {
margin-top: 7px;
}
.im_grouped .icon-select-tick,
.im_grouped .im_message_outer_wrap:hover .icon-select-tick {
margin-top: 7px;
}
.im_grouped_fwd_short .icon-select-tick,
.im_grouped_fwd_short .im_message_outer_wrap:hover .icon-select-tick {
margin-top: -5px;
}
}
.im_dialogs_search_field {
font-size: 12px;
line-height: normal;
border: 1px solid #333333;
border-radius: 5px;
padding: 6px 26px 6px 30px;
margin: 0;
background-color: #333333;
background-image: url(../img/icons/IconsetW.png);
background-repeat: no-repeat;
background-position: -6px -205px;
}
.im_dialogs_scrollable_wrap a.im_dialog_searchpeer,
.im_dialogs_scrollable_wrap a.im_dialog_searchpeer:hover,
.im_dialogs_scrollable_wrap a.im_dialog_searchpeer_selected {
background: #306288;
}
.modal-content {
position: relative;
background-color: #22292d;
background-clip: padding-box;
outline: 0;
}
.confirm_modal_description {
text-align: center;
padding: 20px 0;
font-size: 14px;
line-height: 160%;
color: aliceblue;
}
.tg_head_split, .im_page_wrap,
.im_send_panel_wrap, .im_send_form, .stickerset_modal_stickers_list, .md_modal_body, .im_record_bg
{
background-color: #222;
color:white !important;
border: none;
box-shadow: none;
}
.tg_head_peer_title_wrap, .tg_head_btn
{
background-color: #1d1d1d;
}
.im_dialog_peer
{
color: white !important;
}
.badge
{
color: #ddd !important;
background-color: #444 !important;
}
.im_dialogs_col_wrap
{
border-right: 2px solid #111 !important;
}
`);
})();