Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@felixexter
Last active May 26, 2017 11:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felixexter/a26bf778571b1e4b8b4b to your computer and use it in GitHub Desktop.
Save felixexter/a26bf778571b1e4b8b4b to your computer and use it in GitHub Desktop.
Stylish Slack
var slackId = 'U02D0FE5H'
var processStyles = str =>
str.replace(/;/g, '!important;').replace(/\.color/g, '#client-ui .color')
window.addEventListener('load', () => {
var interval = setInterval(() => {
var $myStyle = document.getElementById('color_rule_color_' + slackId)
if (!$myStyle) {
return
}
clearInterval(interval)
var $styles = Array.from(document.querySelectorAll('style')).filter(node =>
node.innerHTML.match(/\:not\(\.nuc\)/)
)
$styles.forEach(node => {
node.innerHTML = processStyles(node.innerHTML)
})
}, 500);
}, false)
.member::after {
content: ' ' attr(href);
color: #999;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment