Created
April 12, 2019 11:59
-
-
Save MatthiasKainer/bea84a3c369ac8b2624dffb9ba7da697 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name GSlack | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Using the css from https://github.com/paveyry/Slack-Theme-for-Hangouts-Chat/ | |
// @author You | |
// @match https://chat.google.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
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(`/* Reduce left and right margins in the chat area */ | |
.BEjUKc .cFc9ae { | |
margin-left: 10px; | |
margin-right: 10px; | |
width: auto; | |
max-width:none; | |
} | |
.Bl2pUd { | |
padding-left: 0px; | |
padding-right: 0px; | |
} | |
/* Reduce whitespace around New conversation button */ | |
.RnpT2b { | |
margin: 4px 0 4px 0; | |
min-height: 0px; | |
} | |
.IEIJqd { | |
padding-top: 0; | |
} | |
/* Allow messages to display full-width */ | |
.bzJiD .jGyvbd .QIJiHb, .bzJiD .jGyvbd .zX644e { | |
max-width: none; | |
} | |
/* Reduce top and bottom padding around date */ | |
.mCOR5e { | |
padding: 10px 0 5px 0; | |
} | |
/* Reduce right margin in sidebar */ | |
.n5yyEc { | |
margin-right: 4px; | |
} | |
/* Sidebar color */ | |
.X9KLPc { | |
background-color: #4d394b; | |
} | |
/* Sidebar elemtents bg color when hovering */ | |
.PL5Wwe:focus, | |
.PL5Wwe:hover:not(.tuKyod), | |
.tuKyod:hover .LoYJxb { | |
background-color: #3e313c; | |
} | |
/* Sidebar elements text color for chans with unread messages */ | |
.PL5Wwe.H7du2 .t5F5nf { | |
color: #fff; | |
} | |
/* Channel name color in sidebar */ | |
.t5F5nf { | |
color: rgb(202, 196, 201); | |
} | |
/* Sidebar "recent" or "starred" section names text size and color */ | |
.aOHsTc { | |
color: rgb(202, 196, 201); | |
font-size: 16px; | |
margin-left: 16px; | |
} | |
/* Sidebar Search section text color */ | |
.HLTcjb { | |
color: rgb(202, 196, 201); | |
} | |
.D3DXDc { | |
fill: rgb(202, 196, 201) !important; | |
} | |
/* Sidebar search button hovering bg color */ | |
.GbZFNe:focus, .GbZFNe:hover { | |
background-color: #3e313c; | |
} | |
/* Search Menu bg color, shape and dimensions */ | |
.yoV6yd { | |
background-color: #4d394b; | |
margin-top: -4px; | |
width: 100%; | |
border-radius: 0px; | |
-moz-border-radius: 0px | |
} | |
/* Search menu text color */ | |
.Uk0Bfe .zHQkBf, .Uk0Bfe .snByac, .dQ2Tsf .NXfF8b, .dQ2Tsf .ZTmjQb { | |
color: #fff; | |
} | |
.ndJi5d { | |
rgba(0,0,0,0.38); | |
} | |
/* Search Menu "frequent" section text color and size */ | |
.wAR34c { | |
color: #fff; | |
font-size: 16px; | |
} | |
/* Search menu people list mail color */ | |
.Kfe2Ub { | |
color: #fff; | |
} | |
/* Quick search first element bg color */ | |
.dQ2Tsf[aria-selected="true"] { | |
background: transparent; | |
} | |
/* Top left corner section (with title) background color */ | |
.Riuhhf { | |
background-color: #4d394b; | |
} | |
/* Chat top left logo text color */ | |
#XMLID_8_-Clipped{ | |
opacity: 0.8 !important; | |
fill: #fff !important; | |
} | |
/* Padding height between messages in a thread */ | |
.nF6pT { | |
padding-top: 6px; | |
} | |
/* Sidebar "recent" or "starred" section title padding height */ | |
.wJNchb, .nFzS9e { | |
margin-top: 10px; | |
} | |
/* Draw white line between the sidebar sections and reduce padding */ | |
.PL5Wwe + .wJNchb, .teTAFe:not(.fXx9Lc) + .vHL80e .aOHsTc { | |
border-top: solid 1px #e0e0e0; | |
padding-top: 6px; | |
} | |
/* Sidebar channels elements height */ | |
.LoYJxb { | |
height: 26px; | |
} | |
/* Vertically align triple dots buttons on | |
channels in sidebar with the new height */ | |
.MhXXcc { | |
line-height: 26px; | |
} | |
.gsrV1e { | |
height: 22px; | |
width: 22px; | |
} | |
.QeRfYe .Lw7GHd { | |
margin: 2px 6px 0 6px; | |
} | |
/* Time and menu buttons and clock for channels inactive and active colors */ | |
.sFuxxd { | |
color: rgb(202, 196, 201); | |
} | |
.PL5Wwe.H7du2 .sFuxxd { | |
color: #fff; | |
} | |
.DQy0Rb { | |
fill: rgb(202, 196, 201) !important; | |
} | |
.PL5Wwe.H7du2 .DQy0Rb { | |
fill: #fff !important; | |
} | |
.QeRfYe { | |
fill: rgb(202, 196, 201) !important; | |
} | |
.PL5Wwe.H7du2 .QeRfYe { | |
fill: #fff !important; | |
} | |
/* Big emojis size */ | |
.Zc1Emd.NM3Nfc { | |
font-size: 24px; | |
} | |
/* Inline emojis size */ | |
img { | |
border: none; | |
font-size: 1.3em !important; | |
} | |
/* Reduce top margin in thread block */ | |
.dsoUjb { | |
padding: 15px 0; | |
} | |
/* Reduce size of reply button */ | |
.dCMjy { | |
width: 20px; | |
min-width: 20px; | |
height: 20px; | |
min-height: 20px; | |
margin-right: 36px; | |
} | |
/* Reduce space around blue NEW alert */ | |
.k1lILc { | |
padding: 5px 0 0; | |
} | |
.k1lILc + .ajCeRb { | |
padding-top: 5px; | |
} | |
/* Reduce space between thread blocks */ | |
.cZICLc { | |
margin-top: 6px; | |
} | |
/* Increase boldness of usenames in conversations */ | |
.Z4BnXb { | |
font-weight: 900; | |
} | |
/* Make code snippets look like slack's */ | |
.FMTudf { | |
font-family: Monaco,Menlo,Consolas,"Courier New",monospace !important; | |
font-size: .75rem; | |
border: 1px solid #e0e0e0; | |
margin: 10px 0; | |
padding: 3px 10px; | |
background: #f9f9f9; | |
-webkit-border-radius: 4px; | |
-moz-border-radius: 4px; | |
border-radius: 4px; | |
} | |
/* Make inline pre look like slack's */ | |
.U8d2H { | |
font-family: Monaco,Menlo,Consolas,"Courier New",monospace !important; | |
background-color: #f7f7f9; | |
margin: 0px; | |
padding: 1px 3px; | |
color: #d72b3f; | |
-webkit-border-radius: 3px; | |
-moz-border-radius: 3px; | |
border-radius: 3px; | |
} | |
/* Reduce sidebar width */ | |
.X9KLPc, .Riuhhf { | |
width: 280px | |
} | |
/* Reduce margin above "Starred" label */ | |
.aOHsTc { | |
margin-top: 5px; | |
} | |
/* Fix emojis dimensions */ | |
.iiJ4W { | |
height: auto; | |
width: auto; | |
max-height: 1.2em; | |
max-width: 1.2em; | |
min-width: auto; | |
} | |
/* Reduce size of New conv button */ | |
.SfqTBc { | |
padding: 4px 18px 4px 12px; | |
}`); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment