summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Isenhart2019-07-23 21:59:00 -0400
committerBen Isenhart2019-07-23 21:59:00 -0400
commit10645f3b1065e3f770b653d29527baee9d3adba1 (patch)
treeaf5262ce56d872b13793491e746cd9ad4f189e4a
parent4051dec53b45997aacbfe5ca34488e4a39e98c9f (diff)
downloadaur-10645f3b1065e3f770b653d29527baee9d3adba1.tar.gz
update to 4.0.0
-rw-r--r--PKGBUILD31
-rw-r--r--black.css2
-rw-r--r--darkify_slack.js7
3 files changed, 26 insertions, 14 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 2e4a071148b4..7e06d48514e1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,24 +5,24 @@
# Contributor: Kyle Manna <kyle(at)kylemanna(dot)com>
pkgname=slack-desktop-dark
-pkgver=3.4.2
+pkgver=4.0.0
pkgrel=1
pkgdesc="Slack Desktop (Beta) for Linux, with dark theme patch"
arch=('x86_64')
url="https://slack.com/downloads"
license=('custom')
-depends=('alsa-lib' 'gconf' 'gtk3' 'libcurl-compat' 'libsecret' 'libxss'
+depends=('alsa-lib' 'asar' 'gconf' 'gtk3' 'libcurl-compat' 'libsecret' 'libxss'
'libxtst' 'nss' 'glibc>=2.28-4' 'xdg-utils')
optdepends=('gnome-keyring')
conflicts=('slack-desktop')
source=("https://downloads.slack-edge.com/linux_releases/${pkgname%-dark}-${pkgver}-amd64.deb"
- # black.css based on "https://raw.githubusercontent.com/Nockiro/slack-black-theme/13a638fe11e58b4d5aad9dc4f38c904b2f8a600e/black.css"
- "black.css"
- "darkify_slack.js"
- "${pkgname}.patch")
+ # black.css based on "https://raw.githubusercontent.com/Nockiro/slack-black-theme/13a638fe11e58b4d5aad9dc4f38c904b2f8a600e/black.css"
+ "black.css"
+ "darkify_slack.js"
+ "${pkgname}.patch")
noextract=("${pkgname%-dark}-${pkgver}-amd64.deb")
-sha256sums=('3833c1abdbd15b50d9f3e4f77deb4bf6d578cfebfeab2b6ee0e84f567d207261'
- 'SKIP'
+sha256sums=('911a4c05fb4f85181df13f013e82440b0d171862c9cb137dc19b6381d47bd57e'
+ 'SKIP'
'SKIP'
'SKIP')
@@ -41,13 +41,24 @@ package() {
rm -rf "${pkgdir}/usr/share/lintian"
rm -rf "${pkgdir}/usr/share/doc"
- # Insert the black theme directly into ssb-interop.js
+ # Slack packs resources into an ASAR, so it needs to be extracted
+ resources="${pkgdir}/usr/lib/slack/resources"
+ asar extract "${resources}/app.asar" "${resources}/app.asar.unpacked"
+
+ # Insert the black theme directly into ssb-interop
lineno=$(sed -n '/HERE/=' darkify_slack.js)
- file="${pkgdir}/usr/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js"
+ file="${resources}/app.asar.unpacked/dist/ssb-interop.bundle.js"
+
+ # The last line of ssb-interop is comment, so a newline prevents the first line
+ # of our function from being commented out
+ echo "" >> $file
head -n $((lineno - 1)) darkify_slack.js >> $file
cat black.css >> $file
tail -n +$((lineno + 1)) darkify_slack.js >> $file
+ # Repack with the theme change
+ asar pack "${resources}/app.asar.unpacked" "${resources}/app.asar"
+
# Move license
install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}"
mv "${pkgdir}/usr/lib/slack/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}"
diff --git a/black.css b/black.css
index b799d4903045..ad7945118512 100644
--- a/black.css
+++ b/black.css
@@ -1760,8 +1760,6 @@ ts-thread .new_reply_indicator .blue_dot { color: #bf360c; }
.c-channel_insights__channel .channel_link { color: var(--text); }
-.p-channel_insights__channel .channel_link { color: var(--text); }
-
.c-channel_insights__member_count { color: #949494; }
.c-channel_insights__member_count .ts_icon_user { color: #949494; }
diff --git a/darkify_slack.js b/darkify_slack.js
index 03069c5323b2..ea7a32e7ce6e 100644
--- a/darkify_slack.js
+++ b/darkify_slack.js
@@ -1,5 +1,8 @@
document.addEventListener("DOMContentLoaded", function() {
- $("<style></style>").appendTo('head').html(`
+ let s = document.createElement('style');
+ s.type = 'text/css';
+ s.innerHTML = `
HERE
-`);
+`;
+ document.head.appendChild(s);
});