Skip to content

Instantly share code, notes, and snippets.

@shlomi-noach
Last active November 16, 2017 12:51
Show Gist options
  • Save shlomi-noach/89184b55a27d83ffe0a5910e335c12e1 to your computer and use it in GitHub Desktop.
Save shlomi-noach/89184b55a27d83ffe0a5910e335c12e1 to your computer and use it in GitHub Desktop.
Slack CSS override
/*
// Override Slack CSS
// Tested with Slack 2.8.2 Direct Download
// Instructions:
// - Append the following javascript code to:
// - /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js (MacOS/X)
// - /usr/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js (Debian/Ubuntu)
// Solution found on https://github.com/laCour/slack-night-mode/issues/73#issuecomment-329244250
document.addEventListener('DOMContentLoaded', function() {
$.ajax({
url: 'https://gist.githubusercontent.com/shlomi-noach/89184b55a27d83ffe0a5910e335c12e1/raw/slack-css-override.css',
success: function(css) {
$("<style></style>").appendTo('head').html(css);
}
});
});
*/
.file_container.snippet_container.snippet_wrap .CodeMirror .CodeMirror-code > div pre,
.file_container.snippet_container.snippet_wrap .sssh-code .sssh-line pre,
.message .file_container.snippet_container .CodeMirror .CodeMirror-code > div pre,
.message .file_container.snippet_container .sssh-code .sssh-line pre {
white-space: pre;
}
pre.special_formatting {
white-space: pre;
overflow-x: scroll;
}
/* Hubot messages */
ts-message.bot_message .message_body .msg_inline_attachment_column {
font-family: Consolas,monaco,"Ubuntu Mono",courier,monospace;
font-size: 13px;
line-height: 20px;
}
ts-message.bot_message .message_body .attachment_group,
ts-message[data-bot-id] .message_body .attachment_group {
max-width: inherit;
color: #333333;
background-color: #f9f9f9;
}
ts-message[data-bot-id] .message_body .attachment_group .file_preview_preserve_aspect_ratio {
width: 100% !important;
height: 100% !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment