Skip to content

Instantly share code, notes, and snippets.

@Pigpog
Last active October 27, 2018 15:35
Show Gist options
  • Save Pigpog/4dd6a09e4ac58394ae29cf046b615eb4 to your computer and use it in GitHub Desktop.
Save Pigpog/4dd6a09e4ac58394ae29cf046b615eb4 to your computer and use it in GitHub Desktop.
Dark theme Tampermonkey script for telegram web https://web.telegram.org/
// ==UserScript==
// @name telegram dark theme
// @namespace https://github.com/Pigpog
// @version 0.1
// @description Telegram Web Dark Theme
// @author Pigpog
// @match https://web.telegram.org/
// @grant none
// ==/UserScript==
(function() {
function addGlobalStyle(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);
}
addGlobalStyle(`body { color: #eeeeee; background-color:black;}
.im_page_wrap {
background: #111111;
max-width: 100%;
border:0;
}
.tg_head_split{
width:100%;
margin: 0;
max-width: 100%;
}
.tg_head_logo_wrap{
width:21%;
}
.tg_head_main_wrap{
width:79%;
}
.im_dialog_peer{
color:#f6f6f7;
}
.im_dialogs_col_wrap{
background-color:#181818;
border-right: 2px solid #000000;
max-width:25%;
width:21%;
}
.im_message_wrap {
max-width:100%;
}
.im_send_panel_wrap{
margin:0;
width:100%;
}
.im_send_form_wrap1{
width:100%;
}
.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:rgba(100, 100, 100, 0.3);
}
.nano-slider{
background: rgba(255, 255, 255, 0.75);
}
.md_modal_body, .im_message_unread_split, .im_dialogs_search_field, .im_message_selected .im_message_outer_wrap, .tg_head_split{
background:#222222;
}
.tg_checkbox_label{
color:#00eeff;
}
.md_modal_section_splitter{
border-top:0;
background:#000000;
-webkit-box-shadow:0;
-moz-box-shadow:0;
box-shadow:0;
}
.im_record_bg{
border-radius:0;
background:0;
}
.im_dialog_photo, .md_modal_list_peer_photo, .peer_modal_photo{
border-radius:0;
}
.im_history_select_active .im_message_outer_wrap:hover {
background:#000000;
}
.im_send_form{
max-width:100%;
width:100%;
}
.im_send_panel_wrap{
max-width:80%;
}
.im_history_col_wrap{
width:79%;
}
.im_panel_peer_photo{
visibility:hidden;
}
.im_dialogs_scrollable_wrap a.im_dialog:hover, .im_dialogs_scrollable_wrap a.im_dialog_selected {
background:#222222;
}
`);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment