-
Notifications
You must be signed in to change notification settings - Fork 1
/
darkify-slack.sh
executable file
·48 lines (46 loc) · 1.46 KB
/
darkify-slack.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
# OLD! better to just use https://github.com/LostConnection/makeitdark
SLACK_PATH='/usr/lib/slack'
# CSS_URL='https://raw.githubusercontent.com/laCour/slack-night-mode/master/css/raw/variants/black-monospaced.css'
CSS_URL='https://raw.githubusercontent.com/brandonreid/slack-night-mode/master/css/raw/variants/black-monospaced.css'
sudo bash -c "cat > \"${SLACK_PATH}\"/resources/app.asar.unpacked/src/static/ssb-interop.js" << EOF
document.addEventListener('DOMContentLoaded', function() {
$.ajax({
url: '${CSS_URL}',
success: function(css) {
overrides = \`
.p-threads_view {
background: #222;
}
.p-threads_view__divider_line {
border-color: #111;
}
.p-threads_view__divider_label {
background: #111;
}
.p-threads_view_header__channel_name {
color: #c7c7c7;
}
.p-threads_view_root {
border-color: #444;
}
.p-threads_view_reply {
border-color: #444;
}
.p_threads_view_load_newer_button,
.p_threads_view_load_older_button {
background: rgba(255, 255, 255, 0.05);
border-color: #444;
}
.p-threads_view__footer {
border-color: #444;
}
.p-threads_view__default_background {
background: rgba(255, 255, 255, 0.05);
}
\`
\$("<style></style>").appendTo('head').html(css + overrides);
}
});
});
EOF